mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Add tests
This commit is contained in:
parent
647bf4c397
commit
6bab335f5a
4 changed files with 55 additions and 0 deletions
16
test/integration/contact/audit_log_test.rb
Normal file
16
test/integration/contact/audit_log_test.rb
Normal file
|
@ -0,0 +1,16 @@
|
|||
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
|
Loading…
Add table
Add a link
Reference in a new issue