Sha256: 3e1d327c3db5774a645d35be91b4b8f1a6f9f75d08280c15ce25a8e570dda334
Contents?: true
Size: 1.43 KB
Versions: 18
Compression:
Stored size: 1.43 KB
Contents
require 'test_helper' class CheckResultTest < ChilloutTestCase def test_successful_for_response_with_200_code response = stub(:code => "200") check_result = CheckResult.new(response) assert check_result.successful? end def test_not_successful_for_response_with_other_code response = stub(:code => "304") check_result = CheckResult.new(response) refute check_result.successful? end def test_not_successful_for_response_that_dont_respond_to_code response = stub check_result = CheckResult.new(response) refute check_result.successful? end def test_dont_have_problem_with_authorization_for_response_with_200_code response = stub(:code => "200") check_result = CheckResult.new(response) refute check_result.has_problem_with_authorization? end def test_have_problem_with_authorization_for_response_with_401_code response = stub(:code => "401") check_result = CheckResult.new(response) assert check_result.has_problem_with_authorization? end def test_dont_have_problem_with_authorization_for_response_with_other_code response = stub(:code => "501") check_result = CheckResult.new(response) refute check_result.has_problem_with_authorization? end def test_dont_have_problem_with_authorization_for_response_that_dont_respond_to_code response = stub check_result = CheckResult.new(response) refute check_result.has_problem_with_authorization? end end
Version data entries
18 entries across 18 versions & 1 rubygems