summaryrefslogtreecommitdiffstats
path: root/test/unit/time_entry_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-04 23:01:42 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-12-04 23:01:42 +0000
commit10509933486ab651c4a185efc37a6340d503f47b (patch)
treebb7cebf898c6527605ea48d68f1d7fc8e36e27b7 /test/unit/time_entry_test.rb
parent9e5ed4208b8dc531f77708e84f6d11eba3f1ca4a (diff)
downloadredmine-10509933486ab651c4a185efc37a6340d503f47b.tar.gz
redmine-10509933486ab651c4a185efc37a6340d503f47b.zip
Removed unnecessary calculations in time entries index.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8085 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/time_entry_test.rb')
-rw-r--r--test/unit/time_entry_test.rb48
1 files changed, 0 insertions, 48 deletions
diff --git a/test/unit/time_entry_test.rb b/test/unit/time_entry_test.rb
index 97ec76ef1..a9d9fc157 100644
--- a/test/unit/time_entry_test.rb
+++ b/test/unit/time_entry_test.rb
@@ -125,52 +125,4 @@ class TimeEntryTest < ActiveSupport::TestCase
:activity => activity)
assert_equal project.id, te.project.id
end
-
- context "#earilest_date_for_project" do
- setup do
- User.current = nil
- @public_project = Project.generate!(:is_public => true)
- @issue = Issue.generate_for_project!(@public_project)
- TimeEntry.generate!(:spent_on => '2010-01-01',
- :issue => @issue,
- :project => @public_project)
- end
-
- context "without a project" do
- should "return the lowest spent_on value that is visible to the current user" do
- assert_equal "2007-03-12", TimeEntry.earilest_date_for_project.to_s
- end
- end
-
- context "with a project" do
- should "return the lowest spent_on value that is visible to the current user for that project and it's subprojects only" do
- assert_equal "2010-01-01", TimeEntry.earilest_date_for_project(@public_project).to_s
- end
- end
-
- end
-
- context "#latest_date_for_project" do
- setup do
- User.current = nil
- @public_project = Project.generate!(:is_public => true)
- @issue = Issue.generate_for_project!(@public_project)
- TimeEntry.generate!(:spent_on => '2010-01-01',
- :issue => @issue,
- :project => @public_project)
- end
-
- context "without a project" do
- should "return the highest spent_on value that is visible to the current user" do
- assert_equal "2010-01-01", TimeEntry.latest_date_for_project.to_s
- end
- end
-
- context "with a project" do
- should "return the highest spent_on value that is visible to the current user for that project and it's subprojects only" do
- project = Project.find(1)
- assert_equal "2007-04-22", TimeEntry.latest_date_for_project(project).to_s
- end
- end
- end
end