Use open scope in version issues count methods.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8285 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -219,6 +219,16 @@ class IssueTest < ActiveSupport::TestCase
|
||||
assert_equal 0, Issue.find(1).descendants.visible.all.size
|
||||
end
|
||||
|
||||
def test_open_scope
|
||||
issues = Issue.open.all
|
||||
assert_nil issues.detect(&:closed?)
|
||||
end
|
||||
|
||||
def test_open_scope_with_arg
|
||||
issues = Issue.open(false).all
|
||||
assert_equal issues, issues.select(&:closed?)
|
||||
end
|
||||
|
||||
def test_errors_full_messages_should_include_custom_fields_errors
|
||||
field = IssueCustomField.find_by_name('Database')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user