Skip to content

Commit

Permalink
Merge pull request seek4science#1739 from ELIXIR-Belgium/fix_function…
Browse files Browse the repository at this point in the history
…al_assays_controller_tests

Fix assays controller tests
  • Loading branch information
kdp-cloud authored Feb 2, 2024
2 parents f7154c1 + a749164 commit 120b852
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/functional/assays_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -579,26 +579,26 @@ 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

test 'get new with class doesnt present options for class' do
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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 120b852

Please sign in to comment.