File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
test/integration/admin_area Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ require 'test_helper'
2+
3+ class AdminAreaBouncedMailAddressesIntegrationTest < ApplicationIntegrationTest
4+ setup do
5+ @bounced_mail = bounced_mail_addresses ( :one )
6+ sign_in users ( :admin )
7+ end
8+
9+ def test_index_returns_success
10+ get admin_bounced_mail_addresses_path
11+
12+ assert_response :success
13+ assert_match @bounced_mail . email , response . body
14+ end
15+
16+ def test_show_returns_success
17+ get admin_bounced_mail_address_path ( @bounced_mail )
18+
19+ assert_response :success
20+ assert_match @bounced_mail . message_id , response . body
21+ end
22+
23+ def test_destroy_deletes_bounced_mail_address
24+ assert_difference ( 'BouncedMailAddress.count' , -1 ) do
25+ delete admin_bounced_mail_address_path ( @bounced_mail )
26+ end
27+
28+ assert_redirected_to admin_bounced_mail_addresses_path
29+ assert_raises ( ActiveRecord ::RecordNotFound ) { @bounced_mail . reload }
30+ end
31+ end
You can’t perform that action at this time.
0 commit comments