Sha256: 95c8647a9af107eccb2a7203dae7a40d39fd3c30a2bd7e0ece026f7f762510b3

Contents?: true

Size: 814 Bytes

Versions: 1

Compression:

Stored size: 814 Bytes

Contents

require 'unit_test_helper'

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

  def setup
    @client = Xeroizer::PublicApplication.new(CONSUMER_KEY, CONSUMER_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

1 entries across 1 versions & 1 rubygems

Version Path
xeroizer-3-pre-beta-3.0.0.pre.beta test/unit/models/manual_journal_test.rb