Sha256: 10b9badabc08ed2a79ebdcea4f633ee2ee74472aa792ef8de5201452ea97f0c8
Contents?: true
Size: 741 Bytes
Versions: 2
Compression:
Stored size: 741 Bytes
Contents
require 'abstract_unit' class TestResponseTest < ActiveSupport::TestCase def assert_response_code_range(range, predicate) response = ActionDispatch::TestResponse.new (0..599).each do |status| response.status = status assert_equal range.include?(status), response.send(predicate), "ActionDispatch::TestResponse.new(#{status}).#{predicate}" end end test "helpers" do assert_response_code_range 200..299, :success? assert_response_code_range [404], :missing? assert_response_code_range 300..399, :redirect? assert_response_code_range 500..599, :error? assert_response_code_range 500..599, :server_error? assert_response_code_range 400..499, :client_error? end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
activejob-lock-0.0.2 | rails/actionpack/test/dispatch/test_response_test.rb |
activejob-lock-0.0.1 | rails/actionpack/test/dispatch/test_response_test.rb |