Sha256: d5275934152f39e84d7dd9a92ae0101763820ccfda37894affb850533ff57b78
Contents?: true
Size: 794 Bytes
Versions: 16
Compression:
Stored size: 794 Bytes
Contents
# frozen_string_literal: true require 'test_helper' module GraphQL class HTTPClientTest < Test::Unit::TestCase test '#headers uses the Base headers' do ShopifyAPI::Base.headers['X-Custom'] = 'abc' client = ShopifyAPI::GraphQL::HTTPClient.new('2019-07') assert_equal 'abc', client.headers({})['X-Custom'] ShopifyAPI::Base.headers.delete('X-Custom') end test '#uri uses the Base site and the API version' do ShopifyAPI::Base.site = 'https://foo:bar@www.zombo.com' api_version = ShopifyAPI::ApiVersion.new(handle: '2019-07') client = ShopifyAPI::GraphQL::HTTPClient.new(api_version) expected_uri = URI('https://foo:bar@www.zombo.com/admin/api/2019-07/graphql.json') assert_equal expected_uri, client.uri end end end
Version data entries
16 entries across 16 versions & 2 rubygems