Sha256: 189d4c87ec86570b32886b30fca8e1737d2bc92386130fd79390e209c59a143b
Contents?: true
Size: 706 Bytes
Versions: 2
Compression:
Stored size: 706 Bytes
Contents
require 'spec_helper' require 'pact_broker/api/decorators/pacticipant_decorator' require 'pact_broker/models/pacticipant' module PactBroker module Api module Decorators describe PacticipantRepresenter do let(:created_at) { Time.new(2014, 3, 4) } let(:updated_at) { Time.new(2014, 3, 5) } let(:pacticipant) { PactBroker::Models::Pacticipant.new(name: 'Name', updated_at: updated_at, created_at: created_at)} subject { JSON.parse PacticipantRepresenter.new(pacticipant).to_json, symbolize_names: true } it "includes the createdAt timestamp" do expect(subject[:createdAt]).to eq created_at.xmlschema end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pact_broker-1.2.0 | spec/lib/pact_broker/api/decorators/pacticipant_decorator_spec.rb |
pact_broker-1.1.0 | spec/lib/pact_broker/api/decorators/pacticipant_decorator_spec.rb |