internetee-registry/test/integration/contact/audit_log_test.rb
Artur Beljajev 6bab335f5a Add tests
2019-05-17 17:26:26 +03:00

16 lines
No EOL
442 B
Ruby

require 'test_helper'
class ContactAuditLogTest < ActionDispatch::IntegrationTest
def test_stores_metadata
contact = contacts(:john)
contact.legal_document_id = 1
assert_difference 'contact.versions.count' do
contact.save!
end
contact_version = contact.versions.last
assert_equal ({ legal_documents: [1] }).with_indifferent_access,
contact_version.children.with_indifferent_access
end
end