Sha256: 59df05f0e21c89a9b906f02c49788c9504a0126e2bcc52af94ff2ca12925601d

Contents?: true

Size: 989 Bytes

Versions: 1

Compression:

Stored size: 989 Bytes

Contents

require 'request_helper'
require 'mws/reports/requests/report_acknowledgements'

class ReportAcknowledgementsTest < RequestTest
  def mock_response_body
    <<-EOF
      <Response xmlns="ns">
        <Result>
          <Count>1</Count>
          <ReportInfo>
            <ReportId>841997483</ReportId>
            <ReportType>_GET_MERCHANT_LISTINGS_DATA_</ReportType>
            <ReportRequestId>2234038326</ReportRequestId>
            <AvailableDate>2009-01-06T03:48:36+00:00</AvailableDate>
            <Acknowledged>true</Acknowledged>
            <AcknowledgedDate>2009-02-20T02:10:41+00:00</AcknowledgedDate>
          </ReportInfo>
        </Response>
      </Result>
    EOF
  end

  def setup
    @report = MWS::Reports::Requests::ReportAcknowledgements.new(mock_client)
  end

  def test_acknowledges_reports
    res = @report.acknowledge('123')
    refute_empty res
  end

  def test_unacknowledges_reports
    res = @report.unacknowledge('123')
    refute_empty res
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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