From 489ac29202990b8b82d9a792475b6f4e4d11c0ba Mon Sep 17 00:00:00 2001 From: Shiv <44001656+SHIV5T3R@users.noreply.github.com> Date: Fri, 2 Aug 2024 11:36:29 +0100 Subject: [PATCH] Rubocop (for rubocop upgrade) --- test/controllers/lots_controller_test.rb | 2 +- test/controllers/qc_assets_controller_test.rb | 6 +++--- test/controllers/robots_controller_test.rb | 2 +- test/controllers/users_controller_test.rb | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/controllers/lots_controller_test.rb b/test/controllers/lots_controller_test.rb index b83f3602..a6abcfec 100644 --- a/test/controllers/lots_controller_test.rb +++ b/test/controllers/lots_controller_test.rb @@ -153,7 +153,7 @@ class LotsControllerTest < ActionController::TestCase get :search, params: { lot_number: '123456789' } - assert_response 300 + assert_response :multiple_choices assert_select 'h1', 'Multiple lots found' assert_select 'h3', 'IDT Tags' assert_select 'h3', 'IDT Reporters' diff --git a/test/controllers/qc_assets_controller_test.rb b/test/controllers/qc_assets_controller_test.rb index 295d17a9..feb4cf2c 100644 --- a/test/controllers/qc_assets_controller_test.rb +++ b/test/controllers/qc_assets_controller_test.rb @@ -53,7 +53,7 @@ class QcAssetsControllerTest < ActionController::TestCase @request.headers['Accept'] = 'application/json' get :search, params: { user_swipecard: 'abcdef', asset_barcode: '122000000867' } - assert_response 404 + assert_response :not_found end test 'search with children' do @@ -409,7 +409,7 @@ def state sibling: test[:sibling_bc] } if test[:success] - assert_response 302 + assert_response :found else presenter = assigns['presenter'] assert_equal 'Presenter::Error', presenter.class.to_s @@ -519,7 +519,7 @@ def state sibling: test[:sibling_bc] } if test[:success] - assert_response 302 + assert_response :found else presenter = assigns['presenter'] assert_equal 'Presenter::Error', presenter.class.to_s diff --git a/test/controllers/robots_controller_test.rb b/test/controllers/robots_controller_test.rb index 1a8c9ffd..a599510f 100644 --- a/test/controllers/robots_controller_test.rb +++ b/test/controllers/robots_controller_test.rb @@ -32,6 +32,6 @@ class RobotsControllerTest < ActionController::TestCase .raises(Sequencescape::Api::ResourceNotFound, 'There is an issue with the API connection to Sequencescape (["no resources found with that search criteria"])') post :search, params: { robot_barcode: '1234567890123' } - assert_response 404 + assert_response :not_found end end diff --git a/test/controllers/users_controller_test.rb b/test/controllers/users_controller_test.rb index efba7098..c498a8fd 100644 --- a/test/controllers/users_controller_test.rb +++ b/test/controllers/users_controller_test.rb @@ -32,6 +32,6 @@ class UsersControllerTest < ActionController::TestCase post :search, params: { user_swipecard: '123456789' } - assert_response 404 + assert_response :not_found end end