From a7491642ec2f29ddb54fce5d8efc324c77ad8dca Mon Sep 17 00:00:00 2001 From: Kevin De Pelseneer Date: Fri, 2 Feb 2024 17:04:05 +0100 Subject: [PATCH] Fix assays controller tests --- test/functional/assays_controller_test.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/functional/assays_controller_test.rb b/test/functional/assays_controller_test.rb index 1996d36918..145cab20f3 100644 --- a/test/functional/assays_controller_test.rb +++ b/test/functional/assays_controller_test.rb @@ -579,9 +579,9 @@ def test_title login_as(:model_owner) get :new assert_response :success - assert_select 'a[href=?]', new_assay_path(class: :experimental), count: 1 + assert_select 'a[href=?]', new_assay_path(class: 'EXP'), count: 1 assert_select 'a', text: /An #{I18n.t('assays.experimental_assay')}/i, count: 1 - assert_select 'a[href=?]', new_assay_path(class: :modelling), count: 1 + assert_select 'a[href=?]', new_assay_path(class: 'MODEL'), count: 1 assert_select 'a', text: /A #{I18n.t('assays.modelling_analysis')}/i, count: 1 end @@ -589,16 +589,16 @@ def test_title login_as(:model_owner) get :new, params: { class: 'EXP' } assert_response :success - assert_select 'a[href=?]', new_assay_path(class: :experimental), count: 0 + assert_select 'a[href=?]', new_assay_path(class: 'EXP'), count: 0 assert_select 'a', text: /An #{I18n.t('assays.experimental_assay')}/i, count: 0 - assert_select 'a[href=?]', new_assay_path(class: :modelling), count: 0 + assert_select 'a[href=?]', new_assay_path(class: 'MODEL'), count: 0 assert_select 'a', text: /A #{I18n.t('assays.modelling_analysis')}/i, count: 0 get :new, params: { class: 'MODEL' } assert_response :success - assert_select 'a[href=?]', new_assay_path(class: :experimental), count: 0 + assert_select 'a[href=?]', new_assay_path(class: 'EXP'), count: 0 assert_select 'a', text: /An #{I18n.t('assays.experimental_assay')}/i, count: 0 - assert_select 'a[href=?]', new_assay_path(class: :modelling), count: 0 + assert_select 'a[href=?]', new_assay_path(class: 'MODEL'), count: 0 assert_select 'a', text: /A #{I18n.t('assays.modelling_analysis')}/i, count: 0 end @@ -1084,7 +1084,7 @@ def check_fixtures_for_authorization_of_sops_and_datafiles_links test 'new should not include tags element when tags disabled' do with_config_value :tagging_enabled, false do - get :new, params: { class: :experimental } + get :new, params: { class: 'EXP' } assert_response :success assert_select 'div.panel-heading', text: /Tags/, count: 0 assert_select 'select#tag_list', count: 0