Sha256: bd7bb7ea9fac0ec7a8995fb22e886775a00d491385053c887a96dc41fd088cb8
Contents?: true
Size: 965 Bytes
Versions: 12
Compression:
Stored size: 965 Bytes
Contents
require "pact_broker/api/decorators/verifiable_pacts_decorator" module PactBroker module Api module Decorators describe VerifiablePactsDecorator do before do allow(VerifiablePactDecorator).to receive(:new).and_return(verifiable_pact_decorator) end let(:verifiable_pact_decorator) { instance_double(VerifiablePactDecorator).as_null_object } let(:pact) { double("pact") } let(:decorator) { VerifiablePactsDecorator.new([pact]) } let(:options) { { user_options: { resource_url: "http://example.org/pacts" } } } let(:json) { decorator.to_json(options) } subject { JSON.parse(json) } it "includes a list of verifiable pacts" do expect(subject["_embedded"]["pacts"]).to be_an(Array) end it "includes a link to itself" do expect(subject["_links"]["self"]["href"]).to eq "http://example.org/pacts" end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems