Move "everyone" role and "instance actor" account magic number IDs to constants (#29260)
This commit is contained in:
parent
96ddf1d482
commit
245064bb98
9 changed files with 26 additions and 19 deletions
|
@ -164,12 +164,12 @@ RSpec.describe UserRole do
|
|||
end
|
||||
|
||||
describe '#everyone?' do
|
||||
it 'returns true when id is -99' do
|
||||
subject.id = -99
|
||||
it 'returns true when id matches the everyone id' do
|
||||
subject.id = described_class::EVERYONE_ROLE_ID
|
||||
expect(subject.everyone?).to be true
|
||||
end
|
||||
|
||||
it 'returns false when id is not -99' do
|
||||
it 'returns false when id does not match the everyone id' do
|
||||
subject.id = 123
|
||||
expect(subject.everyone?).to be false
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue