diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-04 23:07:10 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-05-04 23:07:10 +0000 |
commit | bef28f7dabc4edbef6c024af602355bc521b0a7f (patch) | |
tree | f096fc295d413a453d717f67bb52e0f955453983 /test/unit/repository_test.rb | |
parent | 49fc255b48b617204e6ca903e4701abbd112ee02 (diff) | |
download | redmine-bef28f7dabc4edbef6c024af602355bc521b0a7f.tar.gz redmine-bef28f7dabc4edbef6c024af602355bc521b0a7f.zip |
test: switch to Rails3 Active Record syntax at test_destroy of unit/repository_test.rb
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9623 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/unit/repository_test.rb')
-rw-r--r-- | test/unit/repository_test.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/test/unit/repository_test.rb b/test/unit/repository_test.rb index 466babb38..512cc581d 100644 --- a/test/unit/repository_test.rb +++ b/test/unit/repository_test.rb @@ -98,9 +98,8 @@ class RepositoryTest < ActiveSupport::TestCase end def test_destroy - changesets = Changeset.count(:all, :conditions => "repository_id = 10") - changes = Change.count(:all, :conditions => "repository_id = 10", - :joins => :changeset) + changesets = Changeset.where("repository_id = 10").all.count + changes = Changeset.joins([:changes]).where("repository_id = 10").all.count assert_difference 'Changeset.count', -changesets do assert_difference 'Change.count', -changes do Repository.find(10).destroy |