maltese 0.8.2 → 0.8.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +1 -1
- data/Gemfile.lock +1 -1
- data/lib/maltese/sitemap.rb +10 -9
- data/lib/maltese/version.rb +1 -1
- data/spec/cli_spec.rb +1 -1
- data/spec/fixtures/vcr_cassettes/Maltese_CLI/sitemap/should_succeed.yml +19 -19
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_data/should_report_if_there_are_works_returned_by_the_Datacite_REST_API.yml +4 -4
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/get_total/with_works.yml +5 -5
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/push_data/should_report_if_there_are_no_works_returned_by_the_Datacite_REST_API.yml +11 -11
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/push_data/should_report_if_there_are_works_returned_by_the_Datacite_REST_API.yml +10 -10
- data/spec/fixtures/vcr_cassettes/Maltese_Sitemap/queue_jobs/should_report_if_there_are_works_returned_by_the_Datacite_REST_API.yml +20 -20
- data/spec/sitemap_spec.rb +3 -3
- metadata +1 -1
data/spec/sitemap_spec.rb
CHANGED
@@ -38,7 +38,7 @@ describe Maltese::Sitemap, vcr: true do
|
|
38
38
|
|
39
39
|
context "get_data" do
|
40
40
|
it "should report if there are works returned by the Datacite REST API" do
|
41
|
-
response = subject.get_data
|
41
|
+
response = subject.get_data(subject.get_query_url)
|
42
42
|
expect(response.body.dig("meta", "total")).to eq(74502)
|
43
43
|
expect(response.body.fetch("data", []).size).to eq(1000)
|
44
44
|
doc = response.body.fetch("data", []).first
|
@@ -46,8 +46,8 @@ describe Maltese::Sitemap, vcr: true do
|
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should catch errors with the Datacite REST API" do
|
49
|
-
stub = stub_request(:get, subject.get_query_url
|
50
|
-
response = subject.get_data(
|
49
|
+
stub = stub_request(:get, subject.get_query_url).to_return(:status => [408])
|
50
|
+
response = subject.get_data(subject.get_query_url)
|
51
51
|
expect(response.body).to eq("errors"=>[{"status"=>408, "title"=>"Request timeout"}])
|
52
52
|
expect(stub).to have_been_requested
|
53
53
|
end
|