Sha256: 195b8696739429e646c0684f3041e9aac2b0a202e70118a0385e65c962c6dc73

Contents?: true

Size: 918 Bytes

Versions: 1

Compression:

Stored size: 918 Bytes

Contents

require 'request_helper'
require 'mws/reports/requests/report_scheduler'

class ReportSchedulerRequestTest < RequestTest
  def mock_response_body
    <<-EOF
      <Response xmlns="ns">
        <Result>
          <Count>1</Count>
          <ReportSchedule>
            <ReportType>_GET_ORDERS_DATA_</ReportType>
            <Schedule>_30_DAYS_</Schedule>
            <ScheduledDate>2009-02-20T02:10:42+00:00</ScheduledDate>
          </ReportSchedule>
        </Response>
      </Result>
    EOF
  end

  def setup
    @scheduler = MWS::Reports::Requests::ReportScheduler.new(mock_client)
  end

  def test_manages_report_schedule
    res = @scheduler.manage('_GET_ORDERS_DATA_', '_1_HOUR_')
    assert_kind_of MWS::Reports::Parsers::ReportScheduler, res
  end

  def test_deletes_report_schedule
    res = @scheduler.delete('_GET_ORDERS_DATA_')
    assert_kind_of MWS::Reports::Parsers::ReportScheduler, res
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
peddler-0.6.4 test/mws/reports/requests/test_report_scheduler.rb