gds-api-adapters 103.4.1 → 103.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1ca9e25a98342ad51743aced3a94571ed70c52900baeb8ba602b3aac79508d03
4
- data.tar.gz: bfa1de8257d71af66eaeb07e3bd250ff023f4e9cc7d75effd5c02e037222010e
3
+ metadata.gz: 3e2d0b360ae0c79b7c043da8ca1eb34eeed1967cc9b4bbb40e857708d03a2be2
4
+ data.tar.gz: 66b220a1b77ea7b0dedbd3a96707572293f1be96be1a56203c5db3e68acdbd34
5
5
  SHA512:
6
- metadata.gz: 302d8fddfb383f2d314bcfa5f9802cafbf908a9fa4c3848c838e3fc5adc9868f6b38a8b9e2024aa055c54d9fdadc4c015272893e8ddca5eb068686497ae569b2
7
- data.tar.gz: 4cf72e311880119cbba79bc117261f30ce3d7dd3faf563bd838966bc5a989fe0103781696ae2461445f556d4c9d46fa02ed0276976ad84e6a9e6db98a29f5428
6
+ metadata.gz: 6e63df1944c2be46ad0f150535fb7925d933d9a39801789a739fe317d16173ee0ad9cade9ccb6b52aacef7e5edefeaf3ea881ed11b2a02fb21b04c32cd16a5bc
7
+ data.tar.gz: f49f78dc28da952d0a8441ed84e8cbaea59a2183e09fa41d0aec6badde07726cef28a805207b7bf842f61845a02f132c97d788b47f891bc00b8dd5c2bfc805ad
@@ -120,6 +120,14 @@ module GdsApi
120
120
  stub_request(:put, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}").to_return(status: 404)
121
121
  end
122
122
 
123
+ def stub_asset_manager_update_asset_too_large(asset_id)
124
+ stub_request(:put, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}").to_return(status: 413)
125
+ end
126
+
127
+ def stub_asset_manager_update_asset_unprocessable(asset_id, body = "")
128
+ stub_request(:put, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}").to_return(body:, status: 422)
129
+ end
130
+
123
131
  def stub_asset_manager_update_asset_failure(asset_id)
124
132
  stub_request(:put, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}").to_return(status: 500)
125
133
  end
@@ -129,6 +137,11 @@ module GdsApi
129
137
  .to_return(body: body.to_json, status: 200)
130
138
  end
131
139
 
140
+ def stub_asset_manager_delete_asset_forbidden(asset_id)
141
+ stub_request(:delete, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}")
142
+ .to_return(status: 403)
143
+ end
144
+
132
145
  def stub_asset_manager_delete_asset_missing(asset_id)
133
146
  stub_request(:delete, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}")
134
147
  .to_return(status: 404)
@@ -137,6 +150,31 @@ module GdsApi
137
150
  def stub_asset_manager_delete_asset_failure(asset_id)
138
151
  stub_request(:delete, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}").to_return(status: 500)
139
152
  end
153
+
154
+ def stub_asset_manager_restore_asset(asset_id, body = {})
155
+ stub_request(:post, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}/restore")
156
+ .to_return(body: body.to_json, status: 200)
157
+ end
158
+
159
+ def stub_asset_manager_restore_asset_forbidden(asset_id)
160
+ stub_request(:post, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}/restore")
161
+ .to_return(status: 403)
162
+ end
163
+
164
+ def stub_asset_manager_restore_asset_not_found(asset_id)
165
+ stub_request(:post, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}/restore")
166
+ .to_return(status: 404)
167
+ end
168
+
169
+ def stub_asset_manager_restore_asset_conflict(asset_id)
170
+ stub_request(:post, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}/restore")
171
+ .to_return(status: 409)
172
+ end
173
+
174
+ def stub_asset_manager_restore_asset_failure(asset_id)
175
+ stub_request(:post, "#{ASSET_MANAGER_ENDPOINT}/assets/#{asset_id}/restore")
176
+ .to_return(status: 500)
177
+ end
140
178
  end
141
179
  end
142
180
  end
@@ -1,3 +1,3 @@
1
1
  module GdsApi
2
- VERSION = "103.4.1".freeze
2
+ VERSION = "103.4.3".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gds-api-adapters
3
3
  version: !ruby/object:Gem::Version
4
- version: 103.4.1
4
+ version: 103.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev