diff options
Diffstat (limited to 'spec/models/group_spec.rb')
-rw-r--r-- | spec/models/group_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 8259ed88d83..006a8402d00 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -39,26 +39,26 @@ describe Group do describe :add_users do let(:user) { create(:user) } - before { group.add_user(user, UsersGroup::MASTER) } + before { group.add_user(user, GroupMember::MASTER) } - it { group.users_groups.masters.map(&:user).should include(user) } + it { group.group_members.masters.map(&:user).should include(user) } end describe :add_users do let(:user) { create(:user) } - before { group.add_users([user.id], UsersGroup::GUEST) } + before { group.add_users([user.id], GroupMember::GUEST) } it "should update the group permission" do - group.users_groups.guests.map(&:user).should include(user) - group.add_users([user.id], UsersGroup::DEVELOPER) - group.users_groups.developers.map(&:user).should include(user) - group.users_groups.guests.map(&:user).should_not include(user) + group.group_members.guests.map(&:user).should include(user) + group.add_users([user.id], GroupMember::DEVELOPER) + group.group_members.developers.map(&:user).should include(user) + group.group_members.guests.map(&:user).should_not include(user) end end describe :avatar_type do let(:user) { create(:user) } - before { group.add_user(user, UsersGroup::MASTER) } + before { group.add_user(user, GroupMember::MASTER) } it "should be true if avatar is image" do group.update_attribute(:avatar, 'uploads/avatar.png') |