Skip to content

Commit

Permalink
Merge branch 'master' into tess-1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Sep 8, 2022
2 parents e2c5905 + 988ec73 commit 8a56388
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
10 changes: 4 additions & 6 deletions test/controllers/curator_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,6 @@ class CuratorControllerTest < ActionController::TestCase
sign_in users(:admin)
new_user = users(:unverified_user)

get :users, params: { with_content: true }

assert_response :success
assert_not_includes assigns(:users), new_user

event = nil
material = nil
workflow = nil
Expand Down Expand Up @@ -178,6 +173,8 @@ class CuratorControllerTest < ActionController::TestCase
get :users, params: { with_content: true }

assert_response :success
assert_includes assigns(:users), new_user
assert_select '.panel-heading a[href=?]', @controller.user_path(new_user), text: new_user.username

User::CREATED_RESOURCE_TYPES.each do |type|
klass = type.to_s.classify.constantize
Expand All @@ -188,7 +185,8 @@ class CuratorControllerTest < ActionController::TestCase
end

[event, material, workflow, collection, provider, source].each do |resource|
assert_select '.curate-user a[href=?]', @controller.polymorphic_path(resource)
assert_select '.curate-user a[href=?]', @controller.polymorphic_path(resource), { text: resource.title },
"#{@controller.polymorphic_path(resource)} not found!, \nBody:\n#{response.body}"
end
end

Expand Down
2 changes: 2 additions & 0 deletions test/mailers/curation_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class CurationMailerTest < ActionMailer::TestCase
keywords: ['unverified', 'user', 'material'],
contact: 'main contact',
status: 'active')
# Avoids queued emails affecting `assert_email` counts. See: https://github.com/ElixirTeSS/TeSS/issues/719
perform_enqueued_jobs
end

teardown do
Expand Down
2 changes: 2 additions & 0 deletions test/mailers/subscription_mailer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ class SubscriptionMailerTest < ActionMailer::TestCase
setup do
@url_opts = Rails.application.routes.default_url_options
Rails.application.routes.default_url_options = Rails.application.config.action_mailer.default_url_options
# Avoids queued emails affecting `assert_email` counts. See: https://github.com/ElixirTeSS/TeSS/issues/719
perform_enqueued_jobs
end

teardown do
Expand Down

0 comments on commit 8a56388

Please sign in to comment.