Sha256: 1441bdab8a54a88c71d5d0ac98ce6033274bdb5325d6ceb003b799a9c855124e

Contents?: true

Size: 1.04 KB

Versions: 19

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'
require 'pact_broker/ui/controllers/relationships'

require 'rack/test'

module PactBroker
  module UI
    module Controllers
      describe Relationships do

        include Rack::Test::Methods

        let(:app) { Relationships }

        describe "/" do
          describe "GET" do

            let(:consumer) { instance_double("PactBroker::Domain::Pacticipant", name: 'consumer_name')}
            let(:provider) { instance_double("PactBroker::Domain::Pacticipant", name: 'provider_name')}
            let(:relationship) { PactBroker::Domain::Relationship.new(consumer, provider)}
            let(:relationships) { [relationship] }

            before do
              allow(PactBroker::Services::PacticipantService).to receive(:find_relationships).and_return(relationships)
            end

            it "does something" do
              get "/"
              expect(last_response.body).to include("Pacts")
              expect(last_response.status).to eq(200)
            end

          end
        end
      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
pact_broker-1.15.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.14.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.13.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.12.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.11.2 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.11.1 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.11.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.10.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.9.3 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.9.2 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.9.1 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.9.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.9.0.rc1 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.8.1 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.8.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.7.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.6.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.5.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb
pact_broker-1.4.0 spec/lib/pact_broker/ui/controllers/relationships_spec.rb