summaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-14 18:45:28 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-01-14 18:45:28 +0000
commita81953ef84639e37934ed4fc8a72b4466daeda1a (patch)
tree4604fb1fcc455fd127e49c7829da21a6a2790e1e /test/unit
parent88d847a1d51249236a57a2a5ddf2019e448b42c2 (diff)
downloadredmine-a81953ef84639e37934ed4fc8a72b4466daeda1a.tar.gz
redmine-a81953ef84639e37934ed4fc8a72b4466daeda1a.zip
Adds a test for TimeEntry#spent_on= with invalid string.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4709 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/time_entry_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb
index 70774567e..bd49494c6 100644
--- a/test/unit/time_entry_test.rb
+++ b/test/unit/time_entry_test.rb
@@ -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