Sha256: 6b777772fae79c3d80815ba52da265850bc2329e53d8c254142400aa5eb4cb4b

Contents?: true

Size: 394 Bytes

Versions: 18

Compression:

Stored size: 394 Bytes

Contents

class ResponseJsonSyntaxChecker < Checker

  # checks if the given testcase body represents syntactically valid JSON
  def check
    result = Result.new(@testcase, @response)
    if not valid_json?(@response.body)
      result.succeeded = false
      result.error_message = "expected valid JSON in body\n got --#{@response.body[1..400]}-- #{@response.body.class}"
    end
    result
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
apirunner-0.5.5 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.5.0 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.10 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.9 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.8 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.7 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.6 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.5 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.4 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.3 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.2 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.1 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.4.0 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.3.10 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.3.9 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.3.8 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.3.7 lib/plugins/plug01_response_json_syntax_checker.rb
apirunner-0.3.6 lib/plugins/plug01_response_json_syntax_checker.rb