tax_service_test.rb 458 B

123456789101112
  1. # frozen_string_literal: true
  2. require 'test_helper'
  3. class TaxServiceTest < Test::Unit::TestCase
  4. test "tax service creation" do
  5. fake("tax_services", method: :post, status: 202, body: load_fixture('tax_service'))
  6. ShopifyAPI::TaxService.create(name: "My Tax Service", url: "https://mytaxservice.com")
  7. assert_equal(
  8. '{"tax_service":{"name":"My Tax Service","url":"https://mytaxservice.com"}}',
  9. WebMock.last_request.body
  10. )
  11. end
  12. end