Sha256: 560b2a9ab0f4a8d145f4dd9bbfa2516babb558a68406825bc0908b9f1d0ed178
Contents?: true
Size: 961 Bytes
Versions: 42
Compression:
Stored size: 961 Bytes
Contents
require 'spec_helper' require 'pact_broker/api/decorators/pacticipant_collection_decorator' require 'pact_broker/domain/pacticipant' module PactBroker module Api module Decorators describe PacticipantCollectionDecorator do subject { JSON.parse PacticipantCollectionDecorator.new(pacticipants).to_json, symbolize_names: true } context "with no pacticipants" do let(:pacticipants) { [] } it "doesn't blow up" do subject end end context "with pacticipants" do let(:pacticipant) { PactBroker::Domain::Pacticipant.new(name: 'Name', created_at: DateTime.new, updated_at: DateTime.new)} let(:pacticipants) { [pacticipant] } it "displays a list of pacticipants" do expect(subject[:pacticipants]).to be_instance_of(Array) expect(subject[:pacticipants].size).to eq 1 end end end end end end
Version data entries
42 entries across 42 versions & 1 rubygems