Skip to content

Commit

Permalink
Merge pull request #294 from sul-dlss/upgrade-druid-tools
Browse files Browse the repository at this point in the history
Upgrade druid-tools to 2.0.0
  • Loading branch information
justinlittman authored May 28, 2019
2 parents 357109c + 10a31c1 commit ece5f54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ GEM
faraday (~> 0.9, >= 0.9.2)
faraday_middleware
nokogiri (~> 1.6)
druid-tools (1.0.0)
druid-tools (2.0.0)
dry-configurable (0.8.2)
concurrent-ruby (~> 1.0)
dry-core (~> 0.4, >= 0.4.7)
Expand Down
10 changes: 2 additions & 8 deletions spec/services/publish_metadata_service_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,14 @@
FileUtils.remove_entry purl_root
end

it 'notifies the purl service of the deletion' do
service.publish
expect(WebMock).to have_requested(:delete, 'example.com/purl/purls/ab123cd4567')
end

it "removes the item's content from the Purl document cache and creates a .delete entry" do
it "removes the item's content from the Purl document cache and notifies the purl service of the deletion" do
# create druid tree and dummy content in purl root
druid1 = DruidTools::Druid.new item.pid, purl_root
druid1.mkdir
expect(druid1).not_to be_deletes_record_exists # deletes record not there yet
File.open(File.join(druid1.path, 'tmpfile'), 'w') { |f| f.write 'junk' }
service.publish
expect(File).not_to exist(druid1.path) # it should now be gone
expect(druid1).to be_deletes_record_exists # deletes record created
expect(WebMock).to have_requested(:delete, 'example.com/purl/purls/ab123cd4567')
end
end

Expand Down

0 comments on commit ece5f54

Please sign in to comment.