From 502a8ae677131e9e420f501aee329713a547dcc3 Mon Sep 17 00:00:00 2001 From: Naomi Dushay Date: Fri, 6 Dec 2019 17:53:56 -0800 Subject: [PATCH] quiet deprecation warnings when running sdr class specs --- spec/controllers/sdr_controller_spec.rb | 1 + spec/services/sdr_client_spec.rb | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/spec/controllers/sdr_controller_spec.rb b/spec/controllers/sdr_controller_spec.rb index 877b237e8..8a6919153 100644 --- a/spec/controllers/sdr_controller_spec.rb +++ b/spec/controllers/sdr_controller_spec.rb @@ -7,6 +7,7 @@ before do allow(Dor).to receive(:find).and_return(item) + allow(Deprecation).to receive(:warn) end before do diff --git a/spec/services/sdr_client_spec.rb b/spec/services/sdr_client_spec.rb index a0b524d8a..fd2bc1baa 100644 --- a/spec/services/sdr_client_spec.rb +++ b/spec/services/sdr_client_spec.rb @@ -10,6 +10,10 @@ let(:url) { 'http://sdr-services.example.com/sdr/objects/druid:ab123cd4567/current_version' } let(:url_with_basic_auth) { url.sub('http://', 'http://user:password@') } + before do + allow(Deprecation).to receive(:warn) + end + it 'returns the current of the object from SDR' do stub_request(:get, url) .with(headers: { 'Authorization' => 'Basic dXNlcjpwYXNzd29yZA==' })