Sha256: 1c6299987458fe6e07e10a4206a8e5fbe192848dd82146f532c7cd285dc36e37

Contents?: true

Size: 865 Bytes

Versions: 44

Compression:

Stored size: 865 Bytes

Contents

describe MangoPay::Report do

  def create
    params = {
      Tag: 'custom meta',
      CallbackURL: 'http://www.my-site.com/callbackURL/',
      DownloadFormat: 'CSV',
      Sort: 'CreationDate:DESC',
      Preview: false,
      Filters: {},
      Columns: [ 'Id', 'CreationDate' ],
      ReportType: 'transactions'
    }
    MangoPay::Report.create(params)
  end

  describe 'CREATE' do
    it 'creates a report' do
      created = create
      expect(created['Id']).to_not be_nil
    end
  end

  describe 'FETCH' do

    it 'fetches a report' do
      created = create
      fetched = MangoPay::Report.fetch(created['Id'])
      expect(fetched['Id']).to eq(created['Id'])
    end

    it 'fetches all the reports' do
      reports = MangoPay::Report.fetch()
      expect(reports).to be_kind_of(Array)
      expect(reports).not_to be_empty
    end

  end

end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
mangopay-3.28.0 spec/mangopay/report_spec.rb
mangopay-3.27.0 spec/mangopay/report_spec.rb
mangopay-3.26.1 spec/mangopay/report_spec.rb
mangopay-3.26.0 spec/mangopay/report_spec.rb
mangopay-3.25.1 spec/mangopay/report_spec.rb
mangopay-3.25.0 spec/mangopay/report_spec.rb
mangopay-3.24.1 spec/mangopay/report_spec.rb
mangopay-3.24.0 spec/mangopay/report_spec.rb
mangopay-3.23.0 spec/mangopay/report_spec.rb
mangopay-3.22.0 spec/mangopay/report_spec.rb
mangopay-3.21.0 spec/mangopay/report_spec.rb
mangopay-3.20.0 spec/mangopay/report_spec.rb
mangopay-3.19.0 spec/mangopay/report_spec.rb
mangopay-3.18.0 spec/mangopay/report_spec.rb
mangopay-3.17.0 spec/mangopay/report_spec.rb
mangopay-3.16.0 spec/mangopay/report_spec.rb
mangopay-3.15.0 spec/mangopay/report_spec.rb
mangopay-3.14.0 spec/mangopay/report_spec.rb
mangopay-3.13.2 spec/mangopay/report_spec.rb
mangopay-3.12.0 spec/mangopay/report_spec.rb