Skip to content

Commit a10434a

Browse files
committed
forgot to add a new fixture for the 'everyone' ability
1 parent 8f2d018 commit a10434a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/fixtures/user_abilities.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,10 @@ e2_ep_susp:
7373
suspension_end: ~
7474
suspension_message: go away
7575

76-
e_sp:
76+
sp_eo:
77+
community_user: sample_spammer
78+
ability: everyone
79+
80+
sp_ur:
7781
community_user: sample_spammer
7882
ability: unrestricted

test/models/user_test.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ class UserTest < ActiveSupport::TestCase
205205
communities.each do |community|
206206
CommunityUser.unscoped.undeleted.where(community_id: community.id).each do |cu|
207207
unless cu.user.deleted
208-
assert_equal cu.user.ability_on?(community.id, everyone.internal_id), true
208+
assert cu.user.ability_on?(community.id, everyone.internal_id),
209+
"Expected user '#{cu.user.username}' to have the 'everyone' ability"
209210
end
210211
end
211212
end

0 commit comments

Comments
 (0)