Browse Source

Add tests for #35764.

git-svn-id: http://svn.redmine.org/redmine/trunk@21239 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/5.0.0
Marius Balteanu 2 years ago
parent
commit
a84efa8046
2 changed files with 12 additions and 0 deletions
  1. 5
    0
      test/unit/issue_test.rb
  2. 7
    0
      test/unit/query_test.rb

+ 5
- 0
test/unit/issue_test.rb View File

r = Issue.like('as_f') r = Issue.like('as_f')
assert_include issue, r assert_include issue, r
end end

def test_like_should_tokenize
r = Issue.like('issue today')
assert_include Issue.find(7), r
end
end end

+ 7
- 0
test/unit/query_test.rb View File

query.add_filter('subject', '~', ['te_t']) query.add_filter('subject', '~', ['te_t'])
assert_equal 1, query.issue_count assert_equal 1, query.issue_count
end 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 end

Loading…
Cancel
Save