Sha256: 484ea43c57617e76d5e25e44e7c17c1f27459cb8fc3611eaf785d7cfbfaccc30

Contents?: true

Size: 809 Bytes

Versions: 2

Compression:

Stored size: 809 Bytes

Contents

require 'unit_test_helper'

class ManualJournalTest < Test::Unit::TestCase
  include TestHelper

  def setup
    @client = Xeroizer::OAuth2Application.new(CLIENT_ID, CLIENT_SECRET)
    mock_api('ManualJournals')
  end

  context "paging" do
    should "have journal lines without downloading full manual journal when paging" do
      manual_journals = @client.ManualJournal.all(page: 1)

      manual_journals.each do |manual_journal|
        # This would kick off a full download without page param.
        manual_journal.journal_lines.size
        assert_equal(true, manual_journal.paged_record_downloaded?)

        # This indicates that there wasn't a separate download of the individual manual journal.
        assert_equal(false, manual_journal.complete_record_downloaded?)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
xeroizer-3.0.1 test/unit/models/manual_journal_test.rb
xeroizer-3.0.0 test/unit/models/manual_journal_test.rb