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:
Jean-Philippe Lang
2013-06-12 19:13:25 +00:00
parent 136cdc765a
commit f9ddb562d5
37 changed files with 155 additions and 170 deletions
+2 -4
View File
@@ -183,9 +183,7 @@ class RepositoryTest < ActiveSupport::TestCase
Setting.default_language = 'en'
# choosing a status to apply to fix issues
Setting.commit_fix_status_id = IssueStatus.find(
:first,
:conditions => ["is_closed = ?", true]).id
Setting.commit_fix_status_id = IssueStatus.where(:is_closed => true).first.id
Setting.commit_fix_done_ratio = "90"
Setting.commit_ref_keywords = 'refs , references, IssueID'
Setting.commit_fix_keywords = 'fixes , closes'
@@ -278,7 +276,7 @@ class RepositoryTest < ActiveSupport::TestCase
end
def test_manual_user_mapping
assert_no_difference "Changeset.count(:conditions => 'user_id <> 2')" do
assert_no_difference "Changeset.where('user_id <> 2').count" do
c = Changeset.create!(
:repository => @repository,
:committer => 'foo',