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:
parent
3d08ea81a9
commit
becc24a3b1
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,10 @@ describe REST::AccountSerializer do
|
||||||
it 'returns the expected role' do
|
it 'returns the expected role' do
|
||||||
expect(subject['roles'].first).to include({ 'name' => 'Role' })
|
expect(subject['roles'].first).to include({ 'name' => 'Role' })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'does not expose the roles permissions' do
|
||||||
|
expect(subject['roles'].first).to_not include({ 'permissions' => role.computed_permissions.to_s })
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when the account has a non-highlighted role' do
|
context 'when the account has a non-highlighted role' do
|
||||||
|
|
Loading…
Reference in a new issue