Sha256: 97df0c4d414a537690ecc9e49143541882a2b998e01124fb45e9903c38ed41f3
Contents?: true
Size: 758 Bytes
Versions: 2
Compression:
Stored size: 758 Bytes
Contents
require 'spec_helper' require 'pact_broker/api/decorators/pacticipant_decorator' require 'pact_broker/domain/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::Domain::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 timestamps" do expect(subject[:createdAt]).to eq created_at.xmlschema expect(subject[:updatedAt]).to eq updated_at.xmlschema end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
pact_broker-1.4.0 | spec/lib/pact_broker/api/decorators/pacticipant_decorator_spec.rb |
pact_broker-1.3.2.rc1 | spec/lib/pact_broker/api/decorators/pacticipant_decorator_spec.rb |