]> source.dussan.org Git - redmine.git/commitdiff
Adds a test for TimeEntry#spent_on= with invalid string.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 14 Jan 2011 18:45:28 +0000 (18:45 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 14 Jan 2011 18:45:28 +0000 (18:45 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4709 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/unit/time_entry_test.rb

index 70774567ef886017f7bcce33ab6719b335a9cad9..bd49494c62bdffe386e47e51bd9d43e247981861 100644 (file)
@@ -67,6 +67,12 @@ class TimeEntryTest < ActiveSupport::TestCase
     assert_equal Date.parse("2011-01-14"), c.spent_on
   end
   
+  def test_spent_on_with_invalid_string
+    c = TimeEntry.new
+    c.spent_on = "foo"
+    assert_nil c.spent_on
+  end
+  
   def test_spent_on_with_date
     c = TimeEntry.new
     c.spent_on = Date.today