diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-06-12 19:13:25 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-06-12 19:13:25 +0000 |
commit | f9ddb562d58ae98bcc69f74396b028cbc8cce0b1 (patch) | |
tree | 8019be9178fb3d14c764c04e3e3a5be955de1385 /test/functional/workflows_controller_test.rb | |
parent | 136cdc765afda57b9be02704e52b27334da42c73 (diff) | |
download | redmine-f9ddb562d58ae98bcc69f74396b028cbc8cce0b1.tar.gz redmine-f9ddb562d58ae98bcc69f74396b028cbc8cce0b1.zip |
Cleanup of finders with :conditions option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11963 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/workflows_controller_test.rb')
-rw-r--r-- | test/functional/workflows_controller_test.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index d04c3ec0a..f5bf3910b 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -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 |