From 93fabf23ae2e4d755dbf1777768f803449d1fce7 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 29 Apr 2011 13:33:15 +0000 Subject: [PATCH] Fixes an assertion for postgresql (#7097). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5603 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- test/unit/query_test.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/query_test.rb b/test/unit/query_test.rb index 0f03260ae..27a0a37e7 100644 --- a/test/unit/query_test.rb +++ b/test/unit/query_test.rb @@ -199,7 +199,7 @@ class QueryTest < ActiveSupport::TestCase query = Query.new(:project => Project.find(1), :name => '_') query.add_filter('due_date', 'w', ['']) - assert query.statement.include?("issues.due_date > '2011-04-24 23:59:59' AND issues.due_date <= '2011-05-01 23:59:59") + assert query.statement.match(/issues\.due_date > '2011-04-24 23:59:59(\.9+)?' AND issues\.due_date <= '2011-05-01 23:59:59(\.9+)?/), "range not found in #{query.statement}" I18n.locale = :en end @@ -211,7 +211,7 @@ class QueryTest < ActiveSupport::TestCase query = Query.new(:project => Project.find(1), :name => '_') query.add_filter('due_date', 'w', ['']) - assert query.statement.include?("issues.due_date > '2011-04-23 23:59:59' AND issues.due_date <= '2011-04-30 23:59:59") + assert query.statement.match(/issues\.due_date > '2011-04-23 23:59:59(\.9+)?' AND issues\.due_date <= '2011-04-30 23:59:59(\.9+)?/), "range not found in #{query.statement}" end def test_operator_does_not_contains