Sha256: b2cea399ea446168a200a33765b0138de1d0a655df7422452ff04e5bbb05044a

Contents?: true

Size: 1.22 KB

Versions: 84

Compression:

Stored size: 1.22 KB

Contents

require 'spec_helper'
require 'pact_broker/doc/controllers/app'

module PactBroker
  module Doc
    module Controllers
      describe App do

        describe "GET relation" do

          let(:app) { PactBroker::Doc::Controllers::App }

          context "when the resource exists" do
            subject { get "/webhooks" }

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

            it "returns a html content type" do
              subject
              expect(last_response.headers['Content-Type']).to eq "text/html;charset=utf-8"
            end

            it "returns a html body" do
              subject
              expect(last_response.body).to include "<html>"
            end
          end

          context "when the resource does not exist" do
            subject { get "/blah" }

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

            it "returns a html content type" do
              subject
              expect(last_response.headers['Content-Type']).to eq "text/html;charset=utf-8"
            end

          end
        end

      end
    end
  end
end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
pact_broker-2.23.4 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.23.3 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.23.2 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.23.1 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.23.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.22.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.21.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.20.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.19.2 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.19.1 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.19.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.18.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.17.1 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.17.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.16.1 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.16.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.15.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.14.0 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.13.1 spec/lib/pact_broker/doc/controllers/app_spec.rb
pact_broker-2.13.0 spec/lib/pact_broker/doc/controllers/app_spec.rb