summaryrefslogtreecommitdiffstats
path: root/test/unit/time_entry_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/time_entry_test.rb')
-rw-r--r--test/unit/time_entry_test.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb
index 3c135510a..a541fc41f 100644
--- a/test/unit/time_entry_test.rb
+++ b/test/unit/time_entry_test.rb
@@ -48,4 +48,19 @@ class TimeEntryTest < ActiveSupport::TestCase
def test_hours_should_default_to_nil
assert_nil TimeEntry.new.hours
end
+
+ context "#earilest_date_for_project" do
+ should "return the lowest spent_on value that is visible to the current user" do
+ User.current = nil
+ assert_equal "2007-03-12", TimeEntry.earilest_date_for_project.to_s
+ end
+ end
+
+ context "#latest_date_for_project" do
+ should "return the highest spent_on value that is visible to the current user" do
+ User.current = nil
+ assert_equal "2007-04-22", TimeEntry.latest_date_for_project.to_s
+ end
+ end
+
end