Skip to content

Commit

Permalink
Test to verify no unnecessary encryption metadata.
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlyobvious committed Mar 8, 2019
1 parent 6a9b481 commit 47281e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ruby_event_store/spec/mappers/encryption_mapper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ def decrypt(r)
expect(event.metadata.to_h).to eq(metadata)
end

specify 'no encryption metadata without encryption schema' do
record = encrypt(ticket_cancelled)
expect(serializer.load(record.metadata)).to eq(metadata)
end

specify 'raises error on encryption with missing encryption key' do
expect do
encrypt(ticket_transferred)
Expand Down

0 comments on commit 47281e4

Please sign in to comment.