Sha256: e84d83d551e26f5644e92b66a36fbae264ba7a036cd7bf4cd268bc7e6b21d008

Contents?: true

Size: 941 Bytes

Versions: 157

Compression:

Stored size: 941 Bytes

Contents

require 'pact_broker/diagnostic/resources/heartbeat'
require 'pact_broker/diagnostic/app'
require 'rack/test'

module PactBroker
  module Diagnostic
    module Resources
      describe Heartbeat do

        include Rack::Test::Methods

        let(:app) { PactBroker::Diagnostic::App.new }

        describe "GET /diagnostic/status/heartbeat" do

          let(:parsed_response_body) { JSON.parse(subject.body) }

          subject { get "/diagnostic/status/heartbeat"; last_response }

          it "returns a 200" do
            expect(subject.status).to eq 200
          end

          it "returns application/hal+json" do
            expect(subject.headers['Content-Type']).to eq "application/hal+json"
          end

          it "returns a link to itself" do
            expect(parsed_response_body['_links']['self']['href']).to eq "http://example.org/diagnostic/status/heartbeat"
          end
        end
      end
    end
  end
end

Version data entries

157 entries across 157 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.79.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.78.1 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.78.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.77.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.76.2 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.76.1 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.76.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.75.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.74.1 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.74.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.73.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.72.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.71.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.70.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.69.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.68.1 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.68.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.67.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb
pact_broker-2.66.0 spec/lib/pact_broker/diagnostic/resources/heartbeat_spec.rb