api_version_test.rb 554 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. require 'test_helper'
  3. class ApiVersionTest < Test::Unit::TestCase
  4. test "no version creates url that start with /admin/" do
  5. assert_equal(
  6. "/admin/resource_path/id.json",
  7. ShopifyAPI::ApiVersion.no_version.construct_api_path("resource_path/id.json")
  8. )
  9. end
  10. test "unstable version creates url that start with /admin/api/unstable/" do
  11. assert_equal(
  12. "/admin/api/unstable/resource_path/id.json",
  13. ShopifyAPI::ApiVersion.unstable.construct_api_path("resource_path/id.json")
  14. )
  15. end
  16. end