0
0
Fork 0

Move "everyone" role and "instance actor" account magic number IDs to constants (#29260)

This commit is contained in:
Matt Jankowski 2024-02-19 06:09:43 -05:00 committed by GitHub
parent 96ddf1d482
commit 245064bb98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 26 additions and 19 deletions

View file

@ -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