Sha256: 4c4edf1f72c4d77f7a55e6294aa57e00a5df4bd8b9ae19f3cc2f406cf6c710f9

Contents?: true

Size: 495 Bytes

Versions: 8

Compression:

Stored size: 495 Bytes

Contents

class ResponseCodeChecker < Checker

  # checks the given responses status code against the one in the expectation and returns result object
  def check
    result = Result.new(@testcase, @response)
    if not @testcase.response_expectation['status_code'].to_s == @response.code.to_s
      result.succeeded = false
      result.error_message = " expected response code --#{@testcase.response_expectation['status_code']}--\n got response code --#{@response.code}--"
    end
    result
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
apirunner-0.3.3 lib/plugins/response_code_checker.rb
apirunner-0.3.2 lib/plugins/response_code_checker.rb
apirunner-0.3.1 lib/plugins/response_code_checker.rb
apirunner-0.3.0 lib/plugins/response_code_checker.rb
apirunner-0.2.8 lib/plugins/response_code_checker.rb
apirunner-0.2.7 lib/plugins/response_code_checker.rb
apirunner-0.2.6 lib/plugins/response_code_checker.rb
apirunner-0.2.5 lib/response_code_checker.rb