Skip to content

Commit

Permalink
test only: fix uniqueness warning
Browse files Browse the repository at this point in the history
This test on mysql rails 6.0 was throwing the following warning:

DEPRECATION WARNING: Uniqueness validator will no longer enforce case sensitive comparison in Rails 6.1
  • Loading branch information
kbrock committed Jul 13, 2023
1 parent c08b07d commit 08539c5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/concerns/hooks_test.rb
Expand Up @@ -39,7 +39,7 @@ def test_update_descendants_with_changed_parent_value
model.class_eval do
before_save :update_name_path
# this example will only work if the name field is unique across all levels
validates :name, :uniqueness => true
validates :name, :uniqueness => {case_sensitive: false}

def update_name_path
self.name_path = [parent&.name_path, name].compact.join('/')
Expand Down

0 comments on commit 08539c5

Please sign in to comment.