mirror of
https://github.com/redmine/redmine.git
synced 2026-07-07 18:12:33 +02:00
Cleanup of finders with :conditions option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11963 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -30,7 +30,7 @@ class WorkflowsControllerTest < ActionController::TestCase
|
||||
assert_response :success
|
||||
assert_template 'index'
|
||||
|
||||
count = WorkflowTransition.count(:all, :conditions => 'role_id = 1 AND tracker_id = 2')
|
||||
count = WorkflowTransition.where(:role_id => 1, :tracker_id => 2).count
|
||||
assert_tag :tag => 'a', :content => count.to_s,
|
||||
:attributes => { :href => '/workflows/edit?role_id=1&tracker_id=2' }
|
||||
end
|
||||
@@ -125,10 +125,10 @@ class WorkflowsControllerTest < ActionController::TestCase
|
||||
end
|
||||
|
||||
def test_clear_workflow
|
||||
assert WorkflowTransition.count(:conditions => {:tracker_id => 1, :role_id => 2}) > 0
|
||||
assert WorkflowTransition.where(:role_id => 1, :tracker_id => 2).count > 0
|
||||
|
||||
post :edit, :role_id => 2, :tracker_id => 1
|
||||
assert_equal 0, WorkflowTransition.count(:conditions => {:tracker_id => 1, :role_id => 2})
|
||||
post :edit, :role_id => 1, :tracker_id => 2
|
||||
assert_equal 0, WorkflowTransition.where(:role_id => 1, :tracker_id => 2).count
|
||||
end
|
||||
|
||||
def test_get_permissions
|
||||
|
||||
Reference in New Issue
Block a user