diff --git a/Gemfile.lock b/Gemfile.lock index 0f0197c9..3162fb9c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -239,7 +239,7 @@ GEM mini_mime (1.1.5) mini_portile2 (2.8.7) minitest (5.25.1) - msgpack (1.7.2) + msgpack (1.7.3) mustermann (3.0.3) ruby2_keywords (~> 0.0.1) mutex_m (0.2.0) @@ -259,8 +259,8 @@ GEM net-ssh (>= 5.0.0, < 8.0.0) net-smtp (0.5.0) net-protocol - net-ssh (7.2.3) - newrelic_rpm (9.13.0) + net-ssh (7.3.0) + newrelic_rpm (9.14.0) nio4r (2.7.3) nokogiri (1.16.7) mini_portile2 (~> 2.8.2) @@ -273,7 +273,7 @@ GEM parser (3.3.5.0) ast (~> 2.4.1) racc - propshaft (1.0.1) + propshaft (1.1.0) actionpack (>= 7.0.0) activesupport (>= 7.0.0) rack @@ -347,7 +347,7 @@ GEM rspec-expectations (3.13.3) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) - rspec-mocks (3.13.1) + rspec-mocks (3.13.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.13.0) rspec-rails (7.0.1) @@ -383,7 +383,7 @@ GEM rack (>= 1.1) rubocop (>= 1.52.0, < 2.0) rubocop-ast (>= 1.31.1, < 2.0) - rubocop-rspec (3.0.5) + rubocop-rspec (3.1.0) rubocop (~> 1.61) rubocop-rspec_rails (2.30.0) rubocop (~> 1.61) @@ -443,7 +443,7 @@ GEM activemodel (>= 6.0.0) bindex (>= 0.4.0) railties (>= 6.0.0) - webmock (3.23.1) + webmock (3.24.0) addressable (>= 2.8.0) crack (>= 0.3.2) hashdiff (>= 0.4.0, < 2.0.0) diff --git a/spec/controllers/renewals_controller_spec.rb b/spec/controllers/renewals_controller_spec.rb index b4856949..4b1c7ea7 100644 --- a/spec/controllers/renewals_controller_spec.rb +++ b/spec/controllers/renewals_controller_spec.rb @@ -3,7 +3,7 @@ require 'rails_helper' RSpec.describe RenewalsController do - let(:api_response) { instance_double('Response', status: 201, content_type: :json) } + let(:api_response) { instance_double(Faraday::Response, status: 201) } let(:mock_client) do instance_double(FolioClient, renew_item_by_id: api_response, ping: true) end @@ -42,7 +42,7 @@ end context 'when the response is not 201' do - let(:api_response) { instance_double('Response', status: 401, content_type: :json) } + let(:api_response) { instance_double(Faraday::Response, status: 401) } it 'does not renew the item and sets flash messages' do post :create, params: { item_id: '123' } diff --git a/spec/controllers/requests_controller_spec.rb b/spec/controllers/requests_controller_spec.rb index 49b87226..d7e5c3d2 100644 --- a/spec/controllers/requests_controller_spec.rb +++ b/spec/controllers/requests_controller_spec.rb @@ -62,7 +62,7 @@ end describe '#update' do - let(:api_response) { instance_double('Response', status: 204, content_type: :json) } + let(:api_response) { instance_double(Faraday::Response, status: 204) } let(:requests) do [instance_double(Folio::Request, key: '123')] @@ -138,7 +138,7 @@ end describe '#destroy' do - let(:api_response) { instance_double('Response', status: 204, content_type: :json) } + let(:api_response) { instance_double(Faraday::Response, status: 204) } let(:mock_client) { instance_double(FolioClient, cancel_request: api_response, ping: true) } let(:requests) do @@ -162,7 +162,7 @@ end context 'when the response is not 204' do - let(:api_response) { instance_double('Response', status: 401, content_type: :json, body: 'foo') } + let(:api_response) { instance_double(Faraday::Response, status: 401, body: 'foo') } it 'does not cancel the hold and sets flash messages' do delete :destroy, params: { id: '123' } diff --git a/spec/features/renew_item_spec.rb b/spec/features/renew_item_spec.rb index 5d2b9747..ea57d97b 100644 --- a/spec/features/renew_item_spec.rb +++ b/spec/features/renew_item_spec.rb @@ -16,7 +16,7 @@ build(:service_points) end - let(:api_response) { instance_double('Response', status: 201, content_type: :json) } + let(:api_response) { instance_double(Faraday::Response, status: 201) } let(:bulk_renew_response) do { success: [instance_double(Folio::Checkout, key: '1', renewable?: true, item_id: '123', title: 'ABC')] } end diff --git a/spec/features/requests_spec.rb b/spec/features/requests_spec.rb index 16e2a937..7f03af3b 100644 --- a/spec/features/requests_spec.rb +++ b/spec/features/requests_spec.rb @@ -12,7 +12,7 @@ build(:service_points) end - let(:api_response) { instance_double('Response', status: 204, content_type: :json) } + let(:api_response) { instance_double(Faraday::Response, status: 204) } before do allow(FolioClient).to receive(:new).and_return(mock_client) diff --git a/yarn.lock b/yarn.lock index da2a11ef..62d9c939 100644 --- a/yarn.lock +++ b/yarn.lock @@ -199,9 +199,9 @@ rails-ujs@^5.2.8-1: integrity sha512-1Xfgv21r3Ira7sgepnvLD546q8hm/uIokK7Ocoi4uLsXkT0HHg8vJaxKfBqbjdb24YeOGBily+jxfcAle7dMWA== readdirp@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.1.tgz#b2fe35f8dca63183cd3b86883ecc8f720ea96ae6" - integrity sha512-GkMg9uOTpIWWKbSsgwb5fA4EavTR+SG/PMPoAY8hkhHfEEY0/vqljY+XHqtDf2cr2IJtoNRDbrrEpZUiZCkYRw== + version "4.0.2" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-4.0.2.tgz#388fccb8b75665da3abffe2d8f8ed59fe74c230a" + integrity sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA== sass@^1.57.1: version "1.79.4"