1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00

Add spec to ensure Account Serializer doesn't expose the permissions associated with a role

This commit is contained in:
Emelia Smith 2024-07-27 17:26:48 +02:00
parent 3d08ea81a9
commit becc24a3b1
No known key found for this signature in database

View file

@ -25,6 +25,10 @@ describe REST::AccountSerializer do
it 'returns the expected role' do
expect(subject['roles'].first).to include({ 'name' => 'Role' })
end
it 'does not expose the roles permissions' do
expect(subject['roles'].first).to_not include({ 'permissions' => role.computed_permissions.to_s })
end
end
context 'when the account has a non-highlighted role' do