Fix deprecation regressions in Repository specs

Signed-off-by: Alex Coles <alex@alexbcoles.com>
pull/3327/head
Alex Coles 9 years ago
parent 18b8625ae2
commit cdffaedbca
  1. 2
      spec/models/repository/git_spec.rb
  2. 2
      spec/models/repository/subversion_spec.rb

@ -149,7 +149,7 @@ describe Repository::Git, type: :model do
it 'should fetch changesets incremental' do
# Remove the 3 latest changesets
instance.changesets.find(:all, order: 'committed_on DESC', limit: 8).each(&:destroy)
instance.changesets.order('committed_on DESC').limit(8).each(&:destroy)
instance.reload
expect(instance.changesets.count).to eq(14)

@ -143,7 +143,7 @@ describe Repository::Subversion, type: :model do
instance.fetch_changesets
# Remove changesets with revision > 5
instance.changesets.find(:all).each do |c| c.destroy if c.revision.to_i > 5 end
instance.changesets.each do |c| c.destroy if c.revision.to_i > 5 end
instance.reload
expect(instance.changesets.count).to eq(5)

Loading…
Cancel
Save