Sha256: 6f5c38e727413bca386a23053bf1e86082d4f2f5a73aefe19ac039be85105646

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>
        </Result>
      </Response>
    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.5 test/mws/reports/requests/test_report_scheduler.rb