mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Add tests for admin bounced mails views
This commit is contained in:
parent
64308e1104
commit
101d5d4a78
5 changed files with 82 additions and 15 deletions
41
test/system/admin_area/bounced_mail_addresses_test.rb
Normal file
41
test/system/admin_area/bounced_mail_addresses_test.rb
Normal file
|
@ -0,0 +1,41 @@
|
|||
require 'application_system_test_case'
|
||||
|
||||
class AdminBouncedMailAddressesTest < ApplicationSystemTestCase
|
||||
include ActionView::Helpers::NumberHelper
|
||||
|
||||
def setup
|
||||
@bounced_mail = bounced_mail_addresses(:one)
|
||||
@original_default_language = Setting.default_language
|
||||
sign_in users(:admin)
|
||||
end
|
||||
|
||||
def teardown
|
||||
Setting.default_language = @original_default_language
|
||||
end
|
||||
|
||||
def test_shows_bounced_emails
|
||||
visit admin_bounced_mail_addresses_path
|
||||
assert_text @bounced_mail.status
|
||||
assert_text @bounced_mail.action
|
||||
assert_text @bounced_mail.diagnostic
|
||||
assert_text @bounced_mail.email
|
||||
end
|
||||
|
||||
def test_shows_detailed_bounced_email
|
||||
visit admin_bounced_mail_address_path(@bounced_mail)
|
||||
assert_text @bounced_mail.status
|
||||
assert_text @bounced_mail.action
|
||||
assert_text @bounced_mail.diagnostic
|
||||
assert_text @bounced_mail.email
|
||||
|
||||
assert_text 'bouncedRecipients'
|
||||
assert_text '010f0174a0c7d4f9-27d59756-6111-4d5f-xxxx-26bee0d55fa2-000000'
|
||||
end
|
||||
|
||||
def test_deletes_registrar
|
||||
visit admin_bounced_mail_address_path(@bounced_mail)
|
||||
click_on 'Destroy'
|
||||
|
||||
assert_text 'Bounced mail address was successfully destroyed.'
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue