diff options
Diffstat (limited to 'spec/serializers/rest/account_serializer_spec.rb')
-rw-r--r-- | spec/serializers/rest/account_serializer_spec.rb | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/spec/serializers/rest/account_serializer_spec.rb b/spec/serializers/rest/account_serializer_spec.rb index ce29df3a7..3bca06b73 100644 --- a/spec/serializers/rest/account_serializer_spec.rb +++ b/spec/serializers/rest/account_serializer_spec.rb @@ -5,7 +5,7 @@ require 'rails_helper' describe REST::AccountSerializer do let(:role) { Fabricate(:user_role, name: 'Role', highlighted: true) } let(:user) { Fabricate(:user, role: role) } - let(:account) { user.account} + let(:account) { user.account } subject { JSON.parse(ActiveModelSerializers::SerializableResource.new(account, serializer: REST::AccountSerializer).to_json) } @@ -34,4 +34,14 @@ describe REST::AccountSerializer do expect(subject['roles']).to eq [] end end + + context 'when the account is memorialized' do + before do + account.memorialize! + end + + it 'marks it as such' do + expect(subject['memorial']).to be true + end + end end |