gds-api-adapters 37.3.0 → 37.4.0
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/lib/gds_api/test_helpers/publishing_api_v2.rb +8 -0
- data/lib/gds_api/version.rb +1 -1
- data/test/test_helpers/publishing_api_v2_test.rb +16 -0
- metadata +40 -40
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edfaed63bfc9dcd1c1f32e624f418363382bd724
|
4
|
+
data.tar.gz: d9a162ebd3876a3f10d3dd635c12229da1cf2fb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69cfa3476da2b94a81f969290cb1058dd6fbad7c0cd6a2340730afdd0b916011ce9b1f87b5ce3a1f47cd825d14e3169e83236cac4bf1a181f416065881ca8d18
|
7
|
+
data.tar.gz: de03c96bcd1c5a8bc22c4b583c75612e063068b050a093cf2ad467d7cfe3bd7537218709e36780d7573d900f32be2990fab0cb5604bb6722bb1d4b61d7dd7200
|
@@ -80,6 +80,14 @@ module GdsApi
|
|
80
80
|
stub_request(:post, %r{\A#{PUBLISHING_API_V2_ENDPOINT}/content/.*/publish})
|
81
81
|
end
|
82
82
|
|
83
|
+
def stub_any_publishing_api_unpublish
|
84
|
+
stub_request(:post, %r{\A#{PUBLISHING_API_V2_ENDPOINT}/content/.*/unpublish})
|
85
|
+
end
|
86
|
+
|
87
|
+
def stub_any_publishing_api_discard_draft
|
88
|
+
stub_request(:post, %r{\A#{PUBLISHING_API_V2_ENDPOINT}/content/.*/discard-draft})
|
89
|
+
end
|
90
|
+
|
83
91
|
def stub_any_publishing_api_call
|
84
92
|
stub_request(:any, %r{\A#{PUBLISHING_API_V2_ENDPOINT}})
|
85
93
|
end
|
data/lib/gds_api/version.rb
CHANGED
@@ -155,4 +155,20 @@ describe GdsApi::TestHelpers::PublishingApiV2 do
|
|
155
155
|
assert_publishing_api_publish("some-content-id")
|
156
156
|
end
|
157
157
|
end
|
158
|
+
|
159
|
+
describe "stub_any_publishing_api_unpublish" do
|
160
|
+
it "stubs any unpublish request to the publishing api" do
|
161
|
+
stub_any_publishing_api_unpublish
|
162
|
+
publishing_api.unpublish("some-content-id", type: :gone)
|
163
|
+
assert_publishing_api_unpublish("some-content-id")
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
describe "stub_any_publishing_api_discard_draft" do
|
168
|
+
it "stubs any discard draft request to the publishing api" do
|
169
|
+
stub_any_publishing_api_discard_draft
|
170
|
+
publishing_api.discard_draft("some-content-id")
|
171
|
+
assert_publishing_api_discard_draft("some-content-id")
|
172
|
+
end
|
173
|
+
end
|
158
174
|
end
|
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: 37.
|
4
|
+
version: 37.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Stewart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: plek
|
@@ -490,56 +490,56 @@ signing_key:
|
|
490
490
|
specification_version: 4
|
491
491
|
summary: Adapters to work with GDS APIs
|
492
492
|
test_files:
|
493
|
-
- test/
|
494
|
-
- test/
|
495
|
-
- test/
|
493
|
+
- test/content_api_test.rb
|
494
|
+
- test/json_client_test.rb
|
495
|
+
- test/content_store_test.rb
|
496
|
+
- test/publishing_api_test.rb
|
497
|
+
- test/business_support_api_test.rb
|
498
|
+
- test/middleware/govuk_header_sniffer_test.rb
|
499
|
+
- test/local_links_manager_api_test.rb
|
496
500
|
- test/list_response_test.rb
|
501
|
+
- test/maslow_test.rb
|
502
|
+
- test/panopticon_registerer_test.rb
|
503
|
+
- test/pp_data_out_test.rb
|
497
504
|
- test/support_test.rb
|
498
|
-
- test/
|
499
|
-
- test/gov_uk_delivery_test.rb
|
505
|
+
- test/asset_manager_test.rb
|
500
506
|
- test/helpers_test.rb
|
501
|
-
- test/test_helper.rb
|
502
|
-
- test/panopticon_test.rb
|
503
|
-
- test/content_store_test.rb
|
504
|
-
- test/publishing_api_v2/get_links_test.rb
|
505
|
-
- test/publishing_api_v2/lookup_test.rb
|
506
|
-
- test/publishing_api_v2/get_expanded_links_test.rb
|
507
|
-
- test/external_link_tracker_test.rb
|
508
|
-
- test/imminence_api_test.rb
|
509
|
-
- test/gds_api_base_test.rb
|
510
|
-
- test/router_test.rb
|
511
|
-
- test/publishing_api_test.rb
|
512
507
|
- test/licence_application_api_test.rb
|
513
|
-
- test/
|
514
|
-
- test/test_helpers/panopticon_test.rb
|
515
|
-
- test/test_helpers/publishing_api_test.rb
|
516
|
-
- test/test_helpers/email_alert_api_test.rb
|
517
|
-
- test/test_helpers/publishing_api_v2_test.rb
|
518
|
-
- test/local_links_manager_api_test.rb
|
508
|
+
- test/test_helper.rb
|
519
509
|
- test/govuk_headers_test.rb
|
520
|
-
- test/
|
510
|
+
- test/publisher_api_test.rb
|
511
|
+
- test/mapit_test.rb
|
521
512
|
- test/rummager_helpers_test.rb
|
513
|
+
- test/publishing_api_v2_test.rb
|
514
|
+
- test/publishing_api_v2/lookup_test.rb
|
515
|
+
- test/publishing_api_v2/get_expanded_links_test.rb
|
516
|
+
- test/publishing_api_v2/get_links_test.rb
|
522
517
|
- test/support_api_test.rb
|
523
518
|
- test/organisations_api_test.rb
|
524
|
-
- test/
|
525
|
-
- test/
|
519
|
+
- test/gds_api_base_test.rb
|
520
|
+
- test/router_test.rb
|
521
|
+
- test/publishing_api/special_route_publisher_test.rb
|
522
|
+
- test/external_link_tracker_test.rb
|
526
523
|
- test/need_api_test.rb
|
527
|
-
- test/
|
524
|
+
- test/panopticon_test.rb
|
525
|
+
- test/pp_data_in_test.rb
|
526
|
+
- test/fixtures/hello.txt
|
527
|
+
- test/fixtures/new_policies_for_dwp.json
|
528
528
|
- test/fixtures/no_services_and_info_data_found_fixture.json
|
529
|
-
- test/fixtures/finder_api/cma-case-schema.json
|
530
|
-
- test/fixtures/world_organisations_australia.json
|
531
|
-
- test/fixtures/old_policies_for_dwp.json
|
532
529
|
- test/fixtures/services_and_info_fixture.json
|
533
|
-
- test/fixtures/
|
534
|
-
- test/fixtures/
|
535
|
-
- test/
|
530
|
+
- test/fixtures/old_policies_for_dwp.json
|
531
|
+
- test/fixtures/world_organisations_australia.json
|
532
|
+
- test/fixtures/sub_sector_organisations.json
|
533
|
+
- test/fixtures/finder_api/cma-case-schema.json
|
536
534
|
- test/worldwide_api_test.rb
|
537
|
-
- test/
|
538
|
-
- test/
|
539
|
-
- test/
|
535
|
+
- test/test_helpers/publishing_api_test.rb
|
536
|
+
- test/test_helpers/publishing_api_v2_test.rb
|
537
|
+
- test/test_helpers/pact_helper.rb
|
538
|
+
- test/test_helpers/panopticon_test.rb
|
539
|
+
- test/test_helpers/email_alert_api_test.rb
|
540
|
+
- test/gov_uk_delivery_test.rb
|
541
|
+
- test/imminence_api_test.rb
|
540
542
|
- test/email_alert_api_test.rb
|
541
|
-
- test/
|
542
|
-
- test/publishing_api_v2_test.rb
|
543
|
+
- test/response_test.rb
|
543
544
|
- test/rummager_test.rb
|
544
|
-
- test/mapit_test.rb
|
545
545
|
has_rdoc:
|