internetee-registry/test/integration/contact/audit_log_test.rb
2020-02-12 18:51:48 +05:00

16 lines
446 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', 1 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