Sha256: d9695dc03bf9ec9493fbe144f1c46a5e6e47778d4dc2726082f36b747d0a589b

Contents?: true

Size: 656 Bytes

Versions: 33

Compression:

Stored size: 656 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

33 entries across 33 versions & 1 rubygems

Version Path
sinatra_resource-0.4.1 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.4.0 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.3.6 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.3.5 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.3.4 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.3.3 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.3.2 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.3.1 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.3.0 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.2.6 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.2.5 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.2.4 examples/datacatalog/test/helpers/shared/common_body_responses.rb
sinatra_resource-0.2.3 examples/datacatalog/test/helpers/shared/common_body_responses.rb