Sha256: 0994542b52ecfd794d55b3ab62792e59fa5d6994f7c10e7abd9dce922230fef9

Contents?: true

Size: 751 Bytes

Versions: 16

Compression:

Stored size: 751 Bytes

Contents

require 'pact_broker/api/resources/base_resource'
require 'pact_broker/error'

module PactBroker
  module Api
    module Resources

      class ErrorTest < BaseResource

        def content_types_provided
          [
            ["application/hal+json", :to_json]
          ]
        end

        def content_types_accepted
          [
            ["application/hal+json", :from_json]
          ]
        end

        def allowed_methods
          ["GET", "POST", "OPTIONS"]
        end

        def to_json
          raise PactBroker::TestError.new("Don't panic. This is a test API error.")
        end

        def from_json
          raise PactBroker::TestError.new("Don't panic. This is a test API error.")
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
pact_broker-2.30.0 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.29.0 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.27.6 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.27.5 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.27.4 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.27.3 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.27.2 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.27.0 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.26.1 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.26.0 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.25.0 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.24.0 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.23.4 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.23.3 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.23.2 lib/pact_broker/api/resources/error_test.rb
pact_broker-2.23.1 lib/pact_broker/api/resources/error_test.rb