@@ -9,11 +9,13 @@ class FriendSitesControllerTest < ActionDispatch::IntegrationTest
9
9
10
10
test 'should list friend sites' do
11
11
get admin_friend_sites_url
12
+
12
13
assert_response :success
13
14
end
14
15
15
16
test 'should get new' do
16
17
get new_admin_friend_site_url
18
+
17
19
assert_response :success
18
20
end
19
21
@@ -25,7 +27,7 @@ class FriendSitesControllerTest < ActionDispatch::IntegrationTest
25
27
url : 'http://example.com'
26
28
}
27
29
}
28
- assert_nil flash [ :alert ]
30
+
29
31
assert flash [ :notice ]
30
32
end
31
33
assert_response :redirect
@@ -38,14 +40,15 @@ class FriendSitesControllerTest < ActionDispatch::IntegrationTest
38
40
url : 'http://example.com'
39
41
}
40
42
}
43
+
41
44
assert flash [ :alert ]
42
- assert_nil flash [ :notice ]
43
45
end
44
46
assert_response :success
45
47
end
46
48
47
49
test 'should get edit' do
48
50
get edit_admin_friend_site_url ( friend_sites ( :one ) )
51
+
49
52
assert_response :success
50
53
end
51
54
@@ -56,7 +59,7 @@ class FriendSitesControllerTest < ActionDispatch::IntegrationTest
56
59
url : 'http://example.com'
57
60
}
58
61
}
59
- assert_nil flash [ :alert ]
62
+
60
63
assert flash [ :notice ]
61
64
assert_response :redirect
62
65
end
@@ -67,35 +70,35 @@ class FriendSitesControllerTest < ActionDispatch::IntegrationTest
67
70
title : ''
68
71
}
69
72
}
73
+
70
74
assert flash [ :alert ]
71
- assert_nil flash [ :notice ]
72
75
assert_response :success
73
76
end
74
77
75
78
test 'should destroy friend site' do
76
79
assert_difference ( 'FriendSite.count' , -1 ) do
77
80
delete admin_friend_site_url ( friend_sites ( :one ) )
81
+
82
+ assert flash [ :notice ]
78
83
end
79
- assert_nil flash [ :alert ]
80
- assert flash [ :notice ]
81
84
assert_response :redirect
82
85
end
83
86
84
87
test 'should lower friend site' do
85
88
assert_difference ( 'friend_sites(:one).reload.position' ) do
86
89
post lower_admin_friend_site_url ( friend_sites ( :one ) )
90
+
91
+ assert_nil flash [ :alert ]
87
92
end
88
- assert_nil flash [ :alert ]
89
- assert_nil flash [ :notice ]
90
93
assert_response :redirect
91
94
end
92
95
93
96
test 'should higher friend site' do
94
97
assert_no_difference ( 'friend_sites(:one).position' ) do
95
98
post higher_admin_friend_site_url ( friend_sites ( :one ) )
99
+
100
+ assert_nil flash [ :alert ]
96
101
end
97
- assert_nil flash [ :alert ]
98
- assert_nil flash [ :notice ]
99
102
assert_response :redirect
100
103
end
101
104
end
0 commit comments