aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/subscriber_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/test/controller/subscriber_test.rb')
-rw-r--r--actionpack/test/controller/subscriber_test.rb42
1 files changed, 14 insertions, 28 deletions
diff --git a/actionpack/test/controller/subscriber_test.rb b/actionpack/test/controller/subscriber_test.rb
index ef1a325799..24132ee928 100644
--- a/actionpack/test/controller/subscriber_test.rb
+++ b/actionpack/test/controller/subscriber_test.rb
@@ -66,15 +66,10 @@ module ActionControllerSubscriberTest
def test_process_action
get :show
wait
- assert_equal 2, logs.size
- assert_match /Processed\sAnother::SubscribersController#show/, logs[0]
- end
-
- def test_process_action_formats
- get :show
- wait
- assert_equal 2, logs.size
- assert_match /text\/html/, logs[0]
+ assert_equal 1, logs.size
+ assert_match /Completed/, logs.first
+ assert_match /\[200\]/, logs.first
+ assert_match /Another::SubscribersController#show/, logs.first
end
def test_process_action_without_parameters
@@ -87,23 +82,14 @@ module ActionControllerSubscriberTest
get :show, :id => '10'
wait
- assert_equal 3, logs.size
- assert_equal 'Parameters: {"id"=>"10"}', logs[1]
+ assert_equal 2, logs.size
+ assert_equal 'Parameters: {"id"=>"10"}', logs[0]
end
def test_process_action_with_view_runtime
get :show
wait
- assert_match /\(Views: [\d\.]+ms\)/, logs[1]
- end
-
- def test_process_action_with_status_and_request_uri
- get :show
- wait
- last = logs.last
- assert_match /Completed/, last
- assert_match /200/, last
- assert_match /another\/subscribers\/show/, last
+ assert_match /\(Views: [\d\.]+ms\)/, logs[0]
end
def test_process_action_with_filter_parameters
@@ -112,7 +98,7 @@ module ActionControllerSubscriberTest
get :show, :lifo => 'Pratik', :amount => '420', :step => '1'
wait
- params = logs[1]
+ params = logs[0]
assert_match /"amount"=>"\[FILTERED\]"/, params
assert_match /"lifo"=>"\[FILTERED\]"/, params
assert_match /"step"=>"1"/, params
@@ -122,7 +108,7 @@ module ActionControllerSubscriberTest
get :redirector
wait
- assert_equal 3, logs.size
+ assert_equal 2, logs.size
assert_equal "Redirected to http://foo.bar/", logs[0]
end
@@ -130,7 +116,7 @@ module ActionControllerSubscriberTest
get :data_sender
wait
- assert_equal 3, logs.size
+ assert_equal 2, logs.size
assert_match /Sent data omg\.txt/, logs[0]
end
@@ -138,7 +124,7 @@ module ActionControllerSubscriberTest
get :file_sender
wait
- assert_equal 3, logs.size
+ assert_equal 2, logs.size
assert_match /Sent file/, logs[0]
assert_match /test\/fixtures\/company\.rb/, logs[0]
end
@@ -147,7 +133,7 @@ module ActionControllerSubscriberTest
get :xfile_sender
wait
- assert_equal 3, logs.size
+ assert_equal 2, logs.size
assert_match /Sent X\-Sendfile header/, logs[0]
assert_match /test\/fixtures\/company\.rb/, logs[0]
end
@@ -157,7 +143,7 @@ module ActionControllerSubscriberTest
get :with_fragment_cache
wait
- assert_equal 4, logs.size
+ assert_equal 3, logs.size
assert_match /Exist fragment\? views\/foo/, logs[0]
assert_match /Write fragment views\/foo/, logs[1]
ensure
@@ -169,7 +155,7 @@ module ActionControllerSubscriberTest
get :with_page_cache
wait
- assert_equal 3, logs.size
+ assert_equal 2, logs.size
assert_match /Write page/, logs[0]
assert_match /\/index\.html/, logs[0]
ensure