my_john_deere_api 0.15.9 → 0.15.10
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6693823c9cdd0da77a655930d27c822ee812ac55a7282c2071d517b65a111f11
|
|
4
|
+
data.tar.gz: d61263b07ad0894f5c3001241b5c0559b7ab64e71b99b0a2373474a3a0a4b40a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dd6e9db9f627140b5442fe104f2f1603b28e98f13d11ee057ef76c160c65d69a02cb215ad8944cd1cc539238f99e65eee0d7498d66e4753b034996ca6cf25363
|
|
7
|
+
data.tar.gz: ceb1d485b7ac8c79401c05724aade4f9841c98549f7bdea317b3666a99a8d125e4171f1c9df3fbd43aa0a623bb509a84fa30e3ed3d659a583ac359cf1a5fd101
|
|
@@ -48,7 +48,7 @@ describe 'MyJohnDeereApi::Authorize' do
|
|
|
48
48
|
url = VCR.use_cassette('get_request_token') { authorize.authorize_url }
|
|
49
49
|
links = VCR.use_cassette('catalog') { JD::Consumer.new(api_key, api_secret, environment: :sandbox).send(:links) }
|
|
50
50
|
|
|
51
|
-
assert_includes url,
|
|
51
|
+
assert_includes url, links[:authorize_request_token]
|
|
52
52
|
|
|
53
53
|
query = URI.parse(url).query
|
|
54
54
|
params = CGI::parse(query)
|
|
@@ -74,7 +74,7 @@ describe 'MyJohnDeereApi::Client' do
|
|
|
74
74
|
|
|
75
75
|
assert_equal '201', response.code
|
|
76
76
|
assert_equal 'Created', response.message
|
|
77
|
-
|
|
77
|
+
assert_equal "#{base_url}/assets/#{asset_id}", response['Location']
|
|
78
78
|
end
|
|
79
79
|
|
|
80
80
|
it 'prepends the leading slash if needed' do
|
|
@@ -84,7 +84,7 @@ describe 'MyJohnDeereApi::Client' do
|
|
|
84
84
|
|
|
85
85
|
assert_equal '201', response.code
|
|
86
86
|
assert_equal 'Created', response.message
|
|
87
|
-
|
|
87
|
+
assert_equal "#{base_url}/assets/#{asset_id}", response['Location']
|
|
88
88
|
end
|
|
89
89
|
end
|
|
90
90
|
|
|
@@ -152,7 +152,7 @@ describe 'MyJohnDeereApi::Request::Create::Asset' do
|
|
|
152
152
|
assert_kind_of Hash, body[:links].first
|
|
153
153
|
assert_equal 'Link', body[:links].first['@type']
|
|
154
154
|
assert_equal 'contributionDefinition', body[:links].first['rel']
|
|
155
|
-
assert_equal "#{
|
|
155
|
+
assert_equal "#{base_url}/contributionDefinitions/#{contribution_definition_id}",
|
|
156
156
|
body[:links].first['uri']
|
|
157
157
|
end
|
|
158
158
|
end
|
data/test/support/helper.rb
CHANGED