mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Remove redundant database column domains.registered_at
Alias `Domain#registered_at` to `created_at` Closes #1442
This commit is contained in:
parent
bfa60a9c17
commit
41fee1d098
7 changed files with 16 additions and 7 deletions
1
test/fixtures/domains.yml
vendored
1
test/fixtures/domains.yml
vendored
|
@ -5,7 +5,6 @@ shop:
|
|||
registrar: bestnames
|
||||
registrant: john
|
||||
transfer_code: 65078d5
|
||||
registered_at: <%= Time.zone.parse('2010-07-04').to_s(:db) %>
|
||||
valid_to: <%= Time.zone.parse('2010-07-05').to_s(:db) %>
|
||||
outzone_at: <%= Time.zone.parse('2010-07-06').to_s(:db) %>
|
||||
delete_date: 2010-07-07
|
||||
|
|
|
@ -425,6 +425,12 @@ class DomainTest < ActiveSupport::TestCase
|
|||
assert_not(@domain.force_delete_scheduled?)
|
||||
end
|
||||
|
||||
def test_aliases_registered_at_to_created_at
|
||||
created_at = Time.zone.parse('2010-07-05 10:00')
|
||||
domain = Domain.new(created_at: created_at)
|
||||
assert_equal created_at, domain.registered_at
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def valid_domain
|
||||
|
|
|
@ -12,7 +12,7 @@ class RegistrantAreaDomainDetailsTest < ApplicationSystemTestCase
|
|||
visit registrant_domain_url(@domain)
|
||||
|
||||
assert_text 'Name shop.test'
|
||||
assert_text "Registered at #{l Time.zone.parse('2010-07-04')}"
|
||||
assert_text "Registered at #{l @domain.registered_at}"
|
||||
assert_link 'Best Names', href: registrant_registrar_path(@domain.registrar)
|
||||
|
||||
assert_text 'Transfer code'
|
||||
|
@ -73,4 +73,4 @@ class RegistrantAreaDomainDetailsTest < ApplicationSystemTestCase
|
|||
|
||||
assert_field nil, with: registrant_domain_update_confirm_url(@domain, token: 'a01')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue