Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kdp-cloud committed Oct 30, 2024
1 parent 9bcbd7e commit b9b5235
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/functional/sample_types_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,9 @@ class SampleTypesControllerTest < ActionController::TestCase
'0': { id: sample_type.sample_attributes.detect(&:is_title), title: 'new title' }
}
} }
assert_nil flash[:error]
assert_redirected_to sample_type_path(sample_type)
sample_type.reload
assert sample_type.locked?

login_as(other_person)
Expand All @@ -826,6 +828,7 @@ class SampleTypesControllerTest < ActionController::TestCase
'0': { id: sample_type.sample_attributes.detect(&:is_title), title: 'new title' }
}
} }
sample_type.reload
sample_type.errors.added?(:base, 'This sample type is locked and cannot be edited right now.')

assert_redirected_to sample_type_path(sample_type)
Expand Down

0 comments on commit b9b5235

Please sign in to comment.