Skip to content

Commit

Permalink
Fix broken tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Dolski committed Feb 28, 2024
1 parent 7d0a71a commit de57ced
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions test/controllers/metadata_profiles_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ class MetadataProfilesControllerTest < ActionDispatch::IntegrationTest
end

test "destroy() destroys a non-default profile" do
log_in_as(users(:southeast_admin))
log_in_as(users(:southeast_sysadmin))
profile = metadata_profiles(:southeast_unused)
assert_difference "MetadataProfile.count", -1 do
delete metadata_profile_path(profile)
end
end

test "destroy() refuses to destroy the default profile" do
log_in_as(users(:southeast_admin))
log_in_as(users(:southeast_sysadmin))
profile = metadata_profiles(:southeast_unused)
profile.update!(institution_default: true)
assert_no_difference "MetadataProfile.count" do
Expand Down
6 changes: 3 additions & 3 deletions test/controllers/submission_profiles_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,15 @@ class SubmissionProfilesControllerTest < ActionDispatch::IntegrationTest
end

test "destroy() destroys a non-default profile" do
log_in_as(users(:southwest_admin))
@profile = submission_profiles(:southwest_default)
log_in_as(users(:southeast_sysadmin))
@profile = submission_profiles(:southeast_unused)
assert_difference "SubmissionProfile.count", -1 do
delete submission_profile_path(@profile)
end
end

test "destroy() refuses to destroy the default profile" do
log_in_as(users(:southwest_admin))
log_in_as(users(:southwest_sysadmin))
@profile = submission_profiles(:southwest_default)
@profile.update!(institution_default: true)
assert_no_difference "SubmissionProfile.count" do
Expand Down

0 comments on commit de57ced

Please sign in to comment.