vendor/rails/actionpack/test/controller/rescue_test.rb in radiantcms-couchrest_model-0.1.4 vs vendor/rails/actionpack/test/controller/rescue_test.rb in radiantcms-couchrest_model-0.1.5
- old
+ new
@@ -279,24 +279,18 @@
assert @response.body.include?('RescueController#raises'), "Response should include controller and action."
assert @response.body.include?("don't panic"), "Response should include exception message."
end
def test_local_request_when_remote_addr_is_localhost
- @controller.expects(:request).returns(@request).at_least(4)
+ @controller.expects(:request).returns(@request).at_least_once
with_remote_addr '127.0.0.1' do
assert @controller.send(:local_request?)
end
- with_remote_addr '::1' do
- assert @controller.send(:local_request?)
- end
end
def test_local_request_when_remote_addr_isnt_locahost
- @controller.expects(:request).returns(@request).at_least(4)
+ @controller.expects(:request).returns(@request)
with_remote_addr '1.2.3.4' do
- assert !@controller.send(:local_request?)
- end
- with_remote_addr '2002::102:304' do
assert !@controller.send(:local_request?)
end
end
def test_rescue_responses