Fix spinach group

This commit is contained in:
Dmitriy Zaporozhets 2013-06-17 17:00:24 +03:00
parent e12c9ee2bc
commit fcc1ba5bf2
2 changed files with 4 additions and 4 deletions

View File

@ -37,6 +37,6 @@ class UsersGroup < ActiveRecord::Base
delegate :name, :username, :email, to: :user, prefix: true
def human_access
UsersGroup.group_access_roles.index(self.group_access)
UsersGroup.group_access_roles.key(self.group_access)
end
end

View File

@ -39,11 +39,11 @@ class Groups < Spinach::FeatureSteps
And 'I select user "John" from list with role "Reporter"' do
user = User.find_by_name("John")
within "#new_team_member" do
within ".new_users_group" do
select2(user.id, from: "#user_ids", multiple: true)
select "Reporter", from: "project_access"
select "Reporter", from: "group_access"
end
click_button "Add"
click_button "Add users into group"
end
Then 'I should see user "John" in team list' do