Sha256: 40fbb64689c62662c4cd2e76d28a9a23f92fd3cbbb10ea3b257030cb3c8c4873

Contents?: true

Size: 817 Bytes

Versions: 102

Compression:

Stored size: 817 Bytes

Contents

require 'pact_broker/domain/index_item'

module PactBroker
  module Domain
    describe IndexItem do
      describe "#last_webhook_execution_date" do
        let(:webhook_execution_1) { double('webhook_execution', created_at: DateTime.new(2013)) }
        let(:webhook_execution_2) { double('webhook_execution', created_at: DateTime.new(2015)) }

        let(:webhook_executions) { [webhook_execution_1, webhook_execution_2] }

        before do
          allow(webhook_executions).to receive(:sort).and_return(webhook_executions)
        end

        subject { IndexItem.create(nil, nil, nil, true, nil, [], webhook_executions) }

        it "returns the created_at date of the last execution" do
          expect(subject.last_webhook_execution_date).to eq DateTime.new(2015)
        end
      end
    end
  end
end

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
pact_broker-2.36.1 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.36.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.35.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.34.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.33.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.32.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.31.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.30.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.29.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.27.6 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.27.5 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.27.4 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.27.3 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.27.2 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.27.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.26.1 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.26.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.25.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.24.0 spec/lib/pact_broker/domain/index_item_spec.rb
pact_broker-2.23.4 spec/lib/pact_broker/domain/index_item_spec.rb