gds-api-adapters 69.0.0 → 69.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gds_api/email_alert_api.rb +5 -4
- data/lib/gds_api/test_helpers/email_alert_api.rb +13 -0
- data/lib/gds_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30536128d763109b2965438ade68ca08a7bc60782f3ad29f4f874ee051d687ef
|
4
|
+
data.tar.gz: 18db0bcda095594ec145e1ab54a6d80b68aa62df2d4348789931b2298d80b9ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f488b6b0512fd5a2ae41bad2116c225b2f39446f3d01fe4e493a1d4f0e4673176561dc0a1a79a68f349fc68f92c3b4d14e3cf8a506ffd81a014f22e3a6ad5480
|
7
|
+
data.tar.gz: 8cb30f4f8c075c4674a792a9647112268be2a52a77c14c7d20c2ee65f5f2fbcf082e4c6211a6603984426e887a240b0910d4d894575a0f267ba156600e1ed2b5
|
@@ -15,14 +15,15 @@ class GdsApi::EmailAlertApi < GdsApi::Base
|
|
15
15
|
raise ArgumentError, message
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
post_json("#{endpoint}/subscriber-lists", attributes)
|
19
19
|
end
|
20
20
|
|
21
|
-
#
|
21
|
+
# Get a subscriber list
|
22
22
|
#
|
23
23
|
# @param attributes [Hash] document_type, links, tags used to search existing subscriber lists
|
24
|
-
def
|
25
|
-
|
24
|
+
def find_subscriber_list(attributes)
|
25
|
+
query_string = nested_query_string(attributes)
|
26
|
+
get_json("#{endpoint}/subscriber-lists?" + query_string)
|
26
27
|
end
|
27
28
|
|
28
29
|
# Post a content change
|
@@ -132,6 +132,19 @@ module GdsApi
|
|
132
132
|
)
|
133
133
|
end
|
134
134
|
|
135
|
+
def stub_email_alert_api_has_subscriber_list(attributes)
|
136
|
+
stub_request(:get, build_subscriber_lists_url(attributes))
|
137
|
+
.to_return(
|
138
|
+
status: 200,
|
139
|
+
body: get_subscriber_list_response(attributes).to_json,
|
140
|
+
)
|
141
|
+
end
|
142
|
+
|
143
|
+
def stub_email_alert_api_does_not_have_subscriber_list(attributes)
|
144
|
+
stub_request(:get, build_subscriber_lists_url(attributes))
|
145
|
+
.to_return(status: 404)
|
146
|
+
end
|
147
|
+
|
135
148
|
def stub_email_alert_api_refuses_to_create_subscriber_list
|
136
149
|
stub_request(:post, build_subscriber_lists_url)
|
137
150
|
.to_return(status: 422)
|
data/lib/gds_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gds-api-adapters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 69.
|
4
|
+
version: 69.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-01-
|
11
|
+
date: 2021-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|