Sha256: 2a71f788b4b76c71ce28cf859223e48882409868d3eb728e8357066645f38994

Contents?: true

Size: 643 Bytes

Versions: 9

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true
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

9 entries across 9 versions & 2 rubygems

Version Path
shopify_api-9.5.2 test/access_token_test.rb
ruby_shopify_api-1.2.0 test/access_token_test.rb
ruby_shopify_api-1.1.0 test/access_token_test.rb
ruby_shopify_api-1.0.0 test/access_token_test.rb
shopify_api-9.5.1 test/access_token_test.rb
shopify_api-9.5 test/access_token_test.rb
shopify_api-9.4.1 test/access_token_test.rb
shopify_api-9.4.0 test/access_token_test.rb
shopify_api-9.3.0 test/access_token_test.rb