shopify_api 4.3.2 → 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/lib/shopify_api/resources/storefront_access_token.rb +4 -0
- data/lib/shopify_api/version.rb +1 -1
- data/test/fixtures/storefront_access_token.json +9 -0
- data/test/fixtures/storefront_access_tokens.json +18 -0
- data/test/storefront_access_token_test.rb +32 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7dca094e5f7ccf2da9550944633cf38e5c0c8cab
|
4
|
+
data.tar.gz: a7418ed1edea504c03d484f6b2ba57aa2f672424
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efcb9714f45426ddab3e895e919329fda0b66c7b920780180e9624d494ad4b5cb523f371ee336edeaced6850e7758b7840dd2db3a38b79fd12166cf59d805319
|
7
|
+
data.tar.gz: 04202532fef99c805d47946a62095636b0bb1e3fe03d9671a23e7126432411eebd0cad2acf7ea1e45da73c6b9b268fec4dd2fece6ac04bfbe1d407157c5d5ac4
|
data/CHANGELOG
CHANGED
data/lib/shopify_api/version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"storefront_access_tokens": [
|
3
|
+
{
|
4
|
+
"id": 1,
|
5
|
+
"access_token": "477697f16c722efd66918cff7b3657a7",
|
6
|
+
"access_scope": "unauthenticated_read_product_listings",
|
7
|
+
"created_at": "2016-11-15T14:15:10-05:00",
|
8
|
+
"title": "Test 1"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"id": 2,
|
12
|
+
"access_token": "477697f16c722efd66918cff7b3657a7",
|
13
|
+
"access_scope": "unauthenticated_read_product_listings",
|
14
|
+
"created_at": "2016-11-15T14:15:10-05:00",
|
15
|
+
"title": "Test 2"
|
16
|
+
}
|
17
|
+
]
|
18
|
+
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class StorefrontAccessTokenTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_create_storefront_access_token
|
6
|
+
fake "storefront_access_tokens", :method => :post, :body => load_fixture('storefront_access_token')
|
7
|
+
storefront_access_token = ShopifyAPI::StorefrontAccessToken.create(title: 'Test')
|
8
|
+
assert_equal 1, storefront_access_token.id
|
9
|
+
assert_equal "Test", storefront_access_token.title
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_delete_storefront_access_token
|
13
|
+
fake 'storefront_access_tokens/1', method: :get, status: 200, body: load_fixture('storefront_access_token')
|
14
|
+
fake 'storefront_access_tokens/1', method: :delete, status: 200, body: 'destroyed'
|
15
|
+
|
16
|
+
storefront_access_tokens = ShopifyAPI::StorefrontAccessToken.find(1)
|
17
|
+
assert storefront_access_tokens.destroy
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_get_storefront_access_tokens
|
21
|
+
fake "storefront_access_tokens", method: :get, status: 201, body: load_fixture('storefront_access_tokens')
|
22
|
+
|
23
|
+
tokens = ShopifyAPI::StorefrontAccessToken.all
|
24
|
+
|
25
|
+
assert_equal 2, tokens.size
|
26
|
+
assert_equal 1, tokens.first.id
|
27
|
+
assert_equal 2, tokens.last.id
|
28
|
+
assert_equal 'Test 1', tokens.first.title
|
29
|
+
assert_equal 'Test 2', tokens.last.title
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shopify_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.3.
|
4
|
+
version: 4.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|
@@ -189,6 +189,7 @@ files:
|
|
189
189
|
- lib/shopify_api/resources/shipping_zone.rb
|
190
190
|
- lib/shopify_api/resources/shop.rb
|
191
191
|
- lib/shopify_api/resources/smart_collection.rb
|
192
|
+
- lib/shopify_api/resources/storefront_access_token.rb
|
192
193
|
- lib/shopify_api/resources/tax_line.rb
|
193
194
|
- lib/shopify_api/resources/tax_service.rb
|
194
195
|
- lib/shopify_api/resources/theme.rb
|
@@ -272,6 +273,8 @@ files:
|
|
272
273
|
- test/fixtures/shipping_zones.json
|
273
274
|
- test/fixtures/shop.json
|
274
275
|
- test/fixtures/smart_collection.json
|
276
|
+
- test/fixtures/storefront_access_token.json
|
277
|
+
- test/fixtures/storefront_access_tokens.json
|
275
278
|
- test/fixtures/tags.json
|
276
279
|
- test/fixtures/tax_service.json
|
277
280
|
- test/fixtures/transaction.json
|
@@ -304,6 +307,7 @@ files:
|
|
304
307
|
- test/shipping_zone_test.rb
|
305
308
|
- test/shop_test.rb
|
306
309
|
- test/smart_collection_test.rb
|
310
|
+
- test/storefront_access_token_test.rb
|
307
311
|
- test/tax_service_test.rb
|
308
312
|
- test/test_helper.rb
|
309
313
|
- test/transaction_test.rb
|