Commit fcc1ba5bf2df46d58a4270a6b6695e0ae51b1fbc
1 parent
e12c9ee2
Exists in
master
and in
4 other branches
Fix spinach group
Showing
2 changed files
with
4 additions
and
4 deletions
Show diff stats
app/models/users_group.rb
@@ -37,6 +37,6 @@ class UsersGroup < ActiveRecord::Base | @@ -37,6 +37,6 @@ class UsersGroup < ActiveRecord::Base | ||
37 | delegate :name, :username, :email, to: :user, prefix: true | 37 | delegate :name, :username, :email, to: :user, prefix: true |
38 | 38 | ||
39 | def human_access | 39 | def human_access |
40 | - UsersGroup.group_access_roles.index(self.group_access) | 40 | + UsersGroup.group_access_roles.key(self.group_access) |
41 | end | 41 | end |
42 | end | 42 | end |
features/steps/group/group.rb
@@ -39,11 +39,11 @@ class Groups < Spinach::FeatureSteps | @@ -39,11 +39,11 @@ class Groups < Spinach::FeatureSteps | ||
39 | 39 | ||
40 | And 'I select user "John" from list with role "Reporter"' do | 40 | And 'I select user "John" from list with role "Reporter"' do |
41 | user = User.find_by_name("John") | 41 | user = User.find_by_name("John") |
42 | - within "#new_team_member" do | 42 | + within ".new_users_group" do |
43 | select2(user.id, from: "#user_ids", multiple: true) | 43 | select2(user.id, from: "#user_ids", multiple: true) |
44 | - select "Reporter", from: "project_access" | 44 | + select "Reporter", from: "group_access" |
45 | end | 45 | end |
46 | - click_button "Add" | 46 | + click_button "Add users into group" |
47 | end | 47 | end |
48 | 48 | ||
49 | Then 'I should see user "John" in team list' do | 49 | Then 'I should see user "John" in team list' do |