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
This commit is contained in:
Jean-Philippe Lang
2013-01-06 14:03:49 +00:00
parent 114537530f
commit 8ee0b52d59
3 changed files with 24 additions and 8 deletions
+10
View File
@@ -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')