Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions test/integration/admin_area/bounced_mail_addresses_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
require 'test_helper'

class AdminAreaBouncedMailAddressesIntegrationTest < ApplicationIntegrationTest
setup do
@bounced_mail = bounced_mail_addresses(:one)
sign_in users(:admin)
end

def test_index_returns_success
get admin_bounced_mail_addresses_path

assert_response :success
assert_match @bounced_mail.email, response.body
end

def test_show_returns_success
get admin_bounced_mail_address_path(@bounced_mail)

assert_response :success
assert_match @bounced_mail.message_id, response.body
end

def test_destroy_deletes_bounced_mail_address
assert_difference('BouncedMailAddress.count', -1) do
delete admin_bounced_mail_address_path(@bounced_mail)
end

assert_redirected_to admin_bounced_mail_addresses_path
assert_raises(ActiveRecord::RecordNotFound) { @bounced_mail.reload }
end
end
Loading