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