mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 15:14:47 +02:00
Rename notifications.body
to text
This commit is contained in:
parent
8765baf319
commit
dfff6f6d12
16 changed files with 30 additions and 22 deletions
6
test/fixtures/notifications.yml
vendored
6
test/fixtures/notifications.yml
vendored
|
@ -1,15 +1,15 @@
|
|||
greeting:
|
||||
body: Welcome!
|
||||
text: Welcome!
|
||||
queued: true
|
||||
registrar: bestnames
|
||||
|
||||
domain_deleted:
|
||||
body: Your domain has been deleted
|
||||
text: Your domain has been deleted
|
||||
queued: true
|
||||
registrar: bestnames
|
||||
created_at: <%= Time.zone.parse('2010-07-05').to_s(:db) %>
|
||||
|
||||
farewell:
|
||||
body: Good bye!
|
||||
text: Good bye!
|
||||
queued: true
|
||||
registrar: goodnames
|
|
@ -23,7 +23,7 @@ class DomainDeleteConfirmJobTest < ActiveSupport::TestCase
|
|||
|
||||
last_registrar_notification = @domain.registrar.notifications.last
|
||||
assert_equal(last_registrar_notification.attached_obj_id, @domain.id)
|
||||
assert_equal(last_registrar_notification.body, 'Registrant rejected domain deletion: shop.test')
|
||||
assert_equal(last_registrar_notification.text, 'Registrant rejected domain deletion: shop.test')
|
||||
end
|
||||
|
||||
def test_accepted_registrant_verification_notifies_registrar
|
||||
|
@ -31,6 +31,6 @@ class DomainDeleteConfirmJobTest < ActiveSupport::TestCase
|
|||
|
||||
last_registrar_notification = @domain.registrar.notifications.last
|
||||
assert_equal(last_registrar_notification.attached_obj_id, @domain.id)
|
||||
assert_equal(last_registrar_notification.body, 'Registrant confirmed domain deletion: shop.test')
|
||||
assert_equal(last_registrar_notification.text, 'Registrant confirmed domain deletion: shop.test')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -23,7 +23,7 @@ class DomainUpdateConfirmJobTest < ActiveSupport::TestCase
|
|||
|
||||
last_registrar_notification = @domain.registrar.notifications.last
|
||||
assert_equal(last_registrar_notification.attached_obj_id, @domain.id)
|
||||
assert_equal(last_registrar_notification.body, 'Registrant rejected domain update: shop.test')
|
||||
assert_equal(last_registrar_notification.text, 'Registrant rejected domain update: shop.test')
|
||||
end
|
||||
|
||||
def test_accepted_registrant_verification_notifies_registrar
|
||||
|
@ -31,6 +31,6 @@ class DomainUpdateConfirmJobTest < ActiveSupport::TestCase
|
|||
|
||||
last_registrar_notification = @domain.registrar.notifications.last
|
||||
assert_equal(last_registrar_notification.attached_obj_id, @domain.id)
|
||||
assert_equal(last_registrar_notification.body, 'Registrant confirmed domain update: shop.test')
|
||||
assert_equal(last_registrar_notification.text, 'Registrant confirmed domain update: shop.test')
|
||||
end
|
||||
end
|
||||
|
|
|
@ -18,14 +18,14 @@ class DomainTransferTest < ActiveSupport::TestCase
|
|||
@domain_transfer.approve
|
||||
end
|
||||
|
||||
body = 'Transfer of domain shop.test has been approved.' \
|
||||
text = 'Transfer of domain shop.test has been approved.' \
|
||||
' It was associated with registrant john-001' \
|
||||
' and contacts acme-ltd-001, jane-001, william-001.'
|
||||
id = @domain_transfer.id
|
||||
class_name = @domain_transfer.class.name
|
||||
|
||||
notification = old_registrar.notifications.last
|
||||
assert_equal body, notification.body
|
||||
assert_equal text, notification.text
|
||||
assert_equal id, notification.attached_obj_id
|
||||
assert_equal class_name, notification.attached_obj_type
|
||||
end
|
||||
|
|
|
@ -9,8 +9,8 @@ class NotificationTest < ActiveSupport::TestCase
|
|||
assert @notification.valid?
|
||||
end
|
||||
|
||||
def test_invalid_without_body
|
||||
@notification.body = nil
|
||||
def test_invalid_without_text
|
||||
@notification.text = ''
|
||||
assert @notification.invalid?
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue