Sha256: 41103cdbaca07af07f85991049367897d72c452ca5ad713685b99130b1a8f5fe

Contents?: true

Size: 811 Bytes

Versions: 19

Compression:

Stored size: 811 Bytes

Contents

require 'spec_helper'
require 'pact_broker/api/decorators/relationships_csv_decorator'

module PactBroker
  module Api
    module Decorators
      describe RelationshipsCsvDecorator do

        let(:pact) { TestDataBuilder.new.create_pact_with_hierarchy("My Consumer", "1.0", "My Provider").and_return(:pact) }
        let(:pacts) { [pact]}

        subject { RelationshipsCsvDecorator.new(pacts) }

        describe "#to_csv" do

          let(:line_1) { '1,My Consumer,1,3158419,0,1,2,0,0,0,0,0,0,0,0'}
          let(:line_2) { '2,My Provider,1,3158419,0,2,0,0,0,0,0,0,0,0,0' }
          let(:expected_text) { [line_1, line_2].join("\n") + "\n" }

          xit "returns the relationships as CSV" do
            expect(subject.to_csv).to eq expected_text
          end
        end

      end
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
pact_broker-2.79.1 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.79.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.78.1 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.78.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.77.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.76.2 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.76.1 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.76.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.75.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.74.1 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.74.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.73.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.72.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.71.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.70.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.69.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.68.1 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.68.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb
pact_broker-2.67.0 spec/lib/pact_broker/api/decorators/relationships_csv_decorator_spec.rb