Sha256: d7eaf61b18f52646d7a82b6b4ce1e413b5fe08afec693d3985058a48e4664e0d
Contents?: true
Size: 1.64 KB
Versions: 6
Compression:
Stored size: 1.64 KB
Contents
# encoding: utf-8 require "spec_helper" describe DpdApi::Order do include Savon::SpecHelper before(:all) { savon.mock! } after(:all) { savon.unmock! } let(:auth) do { request: { auth: { client_number: ENV['DPD_CLIENT_NUMBER'] || '234', client_key: ENV['DPD_CLIENT_KEY'] || '123' } } } end let(:message) { auth.clone.deep_merge!({ request: params }) } # TODO: Add xcontext ".states_by_client_order" do let(:fixture) { File.read("spec/fixtures/dpd_api/tracing/states_by_client_order.xml") } let(:params) do end it "is success" do savon.expects(:get_states_by_client_order).with(message: message).returns(fixture) response = described_class.states_by_client_order(params) expect(response.first).to have_key(:parcel_status) end end # TODO: Add xcontext ".states_by_client_parcel" do let(:fixture) { File.read("spec/fixtures/dpd_api/tracing/states_by_client_parcel.xml") } let(:params) do end it "is success" do savon.expects(:get_states_by_client_parcel).with(message: message).returns(fixture) response = described_class.states_by_client_parcel(params) expect(response.first).to have_key(:parcel_status) end end # TODO: Add xcontext ".states_by_dpd_order" do let(:fixture) { File.read("spec/fixtures/dpd_api/tracing/states_by_dpd_order.xml") } let(:params) do end it "is success" do savon.expects(:get_states_by_dpd_order).with(message: message).returns(fixture) response = described_class.states_by_dpd_order(params) expect(response.first).to have_key(:parcel_status) end end end
Version data entries
6 entries across 6 versions & 1 rubygems