Sha256: 6d2042ca641872db18c8024866f377f5ec65dfba439d43e9042ad1dcf82799d1
Contents?: true
Size: 1005 Bytes
Versions: 66
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
66 entries across 66 versions & 1 rubygems