Sha256: 1d2fca1489fd5cbae5b4bc75bac35e0394dbc18d432ad1f22d575accb39daea8
Contents?: true
Size: 939 Bytes
Versions: 1
Compression:
Stored size: 939 Bytes
Contents
require "spec_helper" shared_examples "a ResponseEnvelope" do let(:response) do described_class.from_json( { :responseEnvelope => { :ack => "Success", :build => "123456", :timestamp => "2011-09-21T00:00:00+00:00", :correlationId => "1234" } }.to_json ) end it "maps ['responseEnvelope']['ack'] to #ack_code" do # expect(response.ack_code).to eq("Success") end it "maps ['responseEnvelope']['build'] to #build" do expect(response.build).to eq("123456") end it "maps ['responseEnvelope']['timestamp'] to #time" do expect(response.time).to eq(DateTime.new(2011, 9, 21)) end it "maps ['responseEnvelope']['correlationId'] to #correlation_id" do expect(response.correlation_id).to eq("1234") end it "provides predicate methods for the ack code" do expect(response.success?).to be_truthy end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
creative-pp-adaptive-1.1.1 | spec/shared/a_response_envelope.rb |