Commit fcc1ba5b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix spinach group

parent e12c9ee2
...@@ -37,6 +37,6 @@ class UsersGroup < ActiveRecord::Base ...@@ -37,6 +37,6 @@ class UsersGroup < ActiveRecord::Base
delegate :name, :username, :email, to: :user, prefix: true delegate :name, :username, :email, to: :user, prefix: true
def human_access def human_access
UsersGroup.group_access_roles.index(self.group_access) UsersGroup.group_access_roles.key(self.group_access)
end end
end end
...@@ -39,11 +39,11 @@ class Groups < Spinach::FeatureSteps ...@@ -39,11 +39,11 @@ class Groups < Spinach::FeatureSteps
And 'I select user "John" from list with role "Reporter"' do And 'I select user "John" from list with role "Reporter"' do
user = User.find_by_name("John") user = User.find_by_name("John")
within "#new_team_member" do within ".new_users_group" do
select2(user.id, from: "#user_ids", multiple: true) select2(user.id, from: "#user_ids", multiple: true)
select "Reporter", from: "project_access" select "Reporter", from: "group_access"
end end
click_button "Add" click_button "Add users into group"
end end
Then 'I should see user "John" in team list' do Then 'I should see user "John" in team list' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment