Sha256: 411696aab3307e47eb91acc43048de0e6512c4ae002fd06708234432fbf90a59

Contents?: true

Size: 600 Bytes

Versions: 44

Compression:

Stored size: 600 Bytes

Contents

require 'test_helper'

class AccessTokenTest < Test::Unit::TestCase

  def test_delegate_access_token
    fake "access_tokens/delegate.json?delegate_access_scope%5B%5D=write_orders&" \
      "delegate_access_scope%5B%5D=read_products&expires_in=",
      method: :post,
      status: 201,
      body: load_fixture('access_token_delegate'),
      extension: false

    delegate_scope = ['write_orders', 'read_products']
    token = ShopifyAPI::AccessToken.delegate(delegate_scope)

    assert_equal 'abracadabra', token.access_token
    assert_equal 'write_orders,read_products', token.scope
  end
end

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
shopify_api-9.2.0 test/access_token_test.rb
shopify_api-9.1.0 test/access_token_test.rb
shopify_api-9.0.4 test/access_token_test.rb
shopify_api-9.0.3 test/access_token_test.rb
shopify_api-9.0.2 test/access_token_test.rb
shopify_api-9.0.1 test/access_token_test.rb
shopify_api-9.0.0 test/access_token_test.rb
shopify_api-8.1.0 test/access_token_test.rb
shopify_api-8.0.0 test/access_token_test.rb
shopify_api-7.1.0 test/access_token_test.rb
shopify_api-7.0.2 test/access_token_test.rb
shopify_api-7.0.1 test/access_token_test.rb
shopify_api-7.0.0 test/access_token_test.rb
shopify_api-6.0.0 test/access_token_test.rb
shopify_api-5.2.4 test/access_token_test.rb
shopify_api-5.2.3 test/access_token_test.rb
shopify_api-5.2.2 test/access_token_test.rb
shopify_api-5.2.1 test/access_token_test.rb
shopify_api-5.2.0 test/access_token_test.rb
shopify_api-5.1.0 test/access_token_test.rb