summaryrefslogtreecommitdiffstats
path: root/test/unit/issue_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-06 14:03:49 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2013-01-06 14:03:49 +0000
commit8ee0b52d590d98a0cb56161135dfaf3a022ff2ee (patch)
tree33187a836b667abf01ad92f4921d51e4dcde177a /test/unit/issue_test.rb
parent114537530f3a87bd3d988bf1b22bc59392040828 (diff)
downloadredmine-8ee0b52d590d98a0cb56161135dfaf3a022ff2ee.tar.gz
redmine-8ee0b52d590d98a0cb56161135dfaf3a022ff2ee.zip
Gantt perf: fixed that Project#start_date and #due_date run way too much queries.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11135 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/issue_test.rb')
-rw-r--r--test/unit/issue_test.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/unit/issue_test.rb b/test/unit/issue_test.rb
index cb89d37a5..9ebb163c4 100644
--- a/test/unit/issue_test.rb
+++ b/test/unit/issue_test.rb
@@ -309,6 +309,16 @@ class IssueTest < ActiveSupport::TestCase
assert_equal issues, issues.select(&:closed?)
end
+ def test_fixed_version_scope_with_a_version_should_return_its_fixed_issues
+ version = Version.find(2)
+ assert version.fixed_issues.any?
+ assert_equal version.fixed_issues.to_a.sort, Issue.fixed_version(version).to_a.sort
+ end
+
+ def test_fixed_version_scope_with_empty_array_should_return_no_result
+ assert_equal 0, Issue.fixed_version([]).count
+ end
+
def test_errors_full_messages_should_include_custom_fields_errors
field = IssueCustomField.find_by_name('Database')