require File.join(File.dirname(__FILE__), '/../spec_helper') module Peddler module Reports describe UnshippedOrdersReport do before(:each) do @transport = Peddler::Transport.new @transport.modernize_request @transport.stub!(:execute_request).and_return('\n2597613290_GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_2009-08-05T19:54:31+00:002009-08-12T19:54:31+00:00false_SUBMITTED_2009-08-12T19:54:31+00:00') @report = Peddler::Reports::UnshippedOrdersReport.new(@transport) end it 'should generate a request' do @report.id.should == '2597613290' @report.status.should == '_SUBMITTED_' end it 'should update status' do @transport.stub!(:execute_request).and_return('\n2893967048_GET_FLAT_FILE_ACTIONABLE_ORDER_DATA_2010-01-04T00:00:00+00:002010-01-12T00:00:00+00:00false_SUBMITTED_2010-01-11T06:02:40+00:00') @report.status!.should == '_SUBMITTED_' end end end end