transaction_test.rb 498 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'test_helper'
  3. class TransactionTest < Test::Unit::TestCase
  4. def setup
  5. super
  6. fake("orders/450789469/transactions/389404469", method: :get, body: load_fixture('transaction'))
  7. end
  8. context "Transaction" do
  9. context "#find" do
  10. should "find a specific transaction" do
  11. transaction = ShopifyAPI::Transaction.find(389404469, params: { order_id: 450789469 })
  12. assert_equal("409.94", transaction.amount)
  13. end
  14. end
  15. end
  16. end