diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-08 16:01:20 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-02-08 16:01:20 +0000 |
commit | c3b91d6f04432811d7535b301d891498b907f7be (patch) | |
tree | 4cb9118b69590e7e95a8de5656af08b281b94f2e /test/test_helper.rb | |
parent | 6aaaac237300d168a42f09a4ecf855ae1b1f9737 (diff) | |
download | redmine-c3b91d6f04432811d7535b301d891498b907f7be.tar.gz redmine-c3b91d6f04432811d7535b301d891498b907f7be.zip |
Fixed assertions for SQLServer that format dates with MM/DD/YYYY in queries.
git-svn-id: http://svn.redmine.org/redmine/trunk@13992 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/test_helper.rb')
-rw-r--r-- | test/test_helper.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb index 63159ad9a..d163c10b2 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -173,6 +173,11 @@ class ActiveSupport::TestCase ActiveRecord::Base.connection.adapter_name =~ /postgresql/i end + def quoted_date(date) + date = Date.parse(date) if date.is_a?(String) + ActiveRecord::Base.connection.quoted_date(date) + end + def assert_save(object) saved = object.save message = "#{object.class} could not be saved" |