Sha256: 8e8f75db705bb72c34d94e71114ff5f2c9b6408f078cd8fa9b0e21742280e931

Contents?: true

Size: 654 Bytes

Versions: 3

Compression:

Stored size: 654 Bytes

Contents

class ResourceTestCase

  shared "return an empty response body" do
    test "should return nil" do
      assert_equal nil, parsed_response_body
    end
  end

  shared "return an empty list response body" do
    test "should return []" do
      assert_equal [], parsed_response_body
    end
  end

  shared "content type header indicates JSON" do
    test "should have JSON content type" do
      assert_equal "application/json", last_response.headers["Content-Type"]
    end
  end

  shared "content type header not set" do
    test "should not have Content-Type set" do
      assert_equal nil, last_response.headers["Content-Type"]
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
sinatra_resource-0.4.24 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.4.23 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.4.22 examples/datacatalog/test/helpers/shared/common_body_responses.rb