summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2021-10-05 19:55:10 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2021-10-05 19:55:10 +0000
commita84efa80468348beb7b19b677defa6a7b1923cb4 (patch)
tree37a1a676f0390460fdf1b60c4a3e0ec352bb4506
parent506fc9d74cdb67af2eaea27662420ec07e32b2f3 (diff)
downloadredmine-a84efa80468348beb7b19b677defa6a7b1923cb4.tar.gz
redmine-a84efa80468348beb7b19b677defa6a7b1923cb4.zip
Add tests for #35764.
git-svn-id: http://svn.redmine.org/redmine/trunk@21239 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--test/unit/issue_test.rb5
-rw-r--r--test/unit/query_test.rb7
2 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index 12a63438d..cc5359862 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -3422,4 +3422,9 @@ class IssueTest < ActiveSupport::TestCase
r = Issue.like('as_f')
assert_include issue, r
end
+
+ def test_like_should_tokenize
+ r = Issue.like('issue today')
+ assert_include Issue.find(7), r
+ end
end
diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb
index 767cf36ba..632335a91 100644
--- a/test/unit/query_test.rb
+++ b/test/unit/query_test.rb
@@ -2826,4 +2826,11 @@ class QueryTest < ActiveSupport::TestCase
query.add_filter('subject', '~', ['te_t'])
assert_equal 1, query.issue_count
end
+
+ def test_sql_contains_should_tokenize
+ query = IssueQuery.new(:project => nil, :name => '_')
+ query.add_filter('subject', '~', ['issue today'])
+
+ assert_equal 1, query.issue_count
+ end
end