mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
16 lines
446 B
Ruby
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
|