diff options
author | Go MAEDA <maeda@farend.jp> | 2024-08-20 09:09:59 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2024-08-20 09:09:59 +0000 |
commit | 7545c82fd33becaeb21d958dff3ee4ec0e7a7666 (patch) | |
tree | 95a4f757dd005b38945a53fd7dc7059cb9281c8e /test | |
parent | e2daacfa34a4583b9f1b1e53410c03edd43b4074 (diff) | |
download | redmine-7545c82fd33becaeb21d958dff3ee4ec0e7a7666.tar.gz redmine-7545c82fd33becaeb21d958dff3ee4ec0e7a7666.zip |
Fix "missing assertions" warning in test_search_should_be_case_and_accent_insensitive_with_postgresql_and_noaccent_extension (#36320).
git-svn-id: https://svn.redmine.org/redmine/trunk@22969 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/search_test.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/unit/search_test.rb b/test/unit/search_test.rb index aa14b9f7e..267aba7ef 100644 --- a/test/unit/search_test.rb +++ b/test/unit/search_test.rb @@ -195,18 +195,18 @@ class SearchTest < ActiveSupport::TestCase end def test_search_should_be_case_and_accent_insensitive_with_postgresql_and_noaccent_extension - if postgresql? - skip unless Redmine::Database.postgresql_version >= 90000 - # Extension will be rollbacked with the test transaction - ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS unaccent") - Redmine::Database.reset - assert Redmine::Database.postgresql_unaccent? - issue1 = Issue.generate!(:subject => "OO") - issue2 = Issue.generate!(:subject => "oo") - r = Issue.search_results('ÖÖ') - assert_include issue1, r - assert_include issue2, r - end + skip unless postgresql? + skip unless Redmine::Database.postgresql_version >= 90000 + + # Extension will be rollbacked with the test transaction + ActiveRecord::Base.connection.execute("CREATE EXTENSION IF NOT EXISTS unaccent") + Redmine::Database.reset + assert Redmine::Database.postgresql_unaccent? + issue1 = Issue.generate!(:subject => "OO") + issue2 = Issue.generate!(:subject => "oo") + r = Issue.search_results('ÖÖ') + assert_include issue1, r + assert_include issue2, r ensure Redmine::Database.reset end |