Skip to content

Commit

Permalink
Updated fixtures
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergei Tsoganov authored and Sergei Tsoganov committed Dec 14, 2023
1 parent e73faae commit 639da20
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 10 deletions.
5 changes: 5 additions & 0 deletions test/fixtures/files/domain_versions.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
Name,Registrant,Registrar,Action,Created at
,John,,destroy,2023-12-04 22:00:00
shop.test,John,Best Names,update,2023-12-04 22:00:00
library.test,Acme Ltd,Best Names,create,2023-12-04 22:00:00
metro.test,Jack,Good Names,create,2023-09-04 21:00:00
cinema.test,John,Good Names,create,2023-09-04 21:00:00
,test_code,Best Names,update,2018-04-23 15:50:48
,John,,update,2010-07-04 21:00:00
26 changes: 16 additions & 10 deletions test/fixtures/log_domains.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,31 @@ transfer_one:
event: update
object:
name: 'shop.test'
registrant_id: <%= ActiveRecord::FixtureSet.identify(:john) %>
object_changes:
registrar_id: [<%= ActiveRecord::FixtureSet.identify(:goodnames) %>, <%= ActiveRecord::FixtureSet.identify(:bestnames) %>]
created_at: <%= 2.days.ago.to_s :db %>
created_at: <%= Time.zone.parse('2023-12-05') %>

create_one:
item_id: 1111111
item_type: Domain
event: create
object_changes:
name: [null, 'deleted.test']
name: [null, 'cinema.test']
registrar_id: [null, <%= ActiveRecord::FixtureSet.identify(:goodnames) %>]
created_at: <%= 3.months.ago.to_s :db %>
registrant_id: [null, <%= ActiveRecord::FixtureSet.identify(:john) %>]
created_at: <%= Time.zone.parse('2023-09-05') %>

destroy_one:
item_id: 1111111
item_type: Domain
event: destroy
object:
registrant_id: <%= ActiveRecord::FixtureSet.identify(:john) %>
object_changes:
name: ['deleted.test', null]
name: ['cinema.test', null]
registrar_id: [<%= ActiveRecord::FixtureSet.identify(:goodnames) %>, null]
created_at: <%= 2.days.ago.to_s :db %>
created_at: <%= Time.zone.parse('2023-12-05') %>

create_two:
item_id: <%= ActiveRecord::FixtureSet.identify(:library) %>
Expand All @@ -42,13 +46,15 @@ create_two:
object_changes:
name: [null, 'library.test']
registrar_id: [null, <%= ActiveRecord::FixtureSet.identify(:bestnames) %>]
created_at: <%= 2.days.ago.to_s :db %>
registrant_id: [null, <%= ActiveRecord::FixtureSet.identify(:acme_ltd) %>]
created_at: <%= Time.zone.parse('2023-12-05') %>

create_three:
item_id: <%= ActiveRecord::FixtureSet.identify(:airport) %>
item_id: <%= ActiveRecord::FixtureSet.identify(:metro) %>
item_type: Domain
event: create
object_changes:
name: [null, 'airport.test']
registrar_id: [null, <%= ActiveRecord::FixtureSet.identify(:bestnames) %>]
created_at: <%= 2.days.ago.to_s :db %>
name: [null, 'metro.test']
registrar_id: [null, <%= ActiveRecord::FixtureSet.identify(:goodnames) %>]
registrant_id: [null, <%= ActiveRecord::FixtureSet.identify(:jack) %>]
created_at: <%= Time.zone.parse('2023-09-05') %>

0 comments on commit 639da20

Please sign in to comment.