VRFS-3007 : Fix band filter search test failure.

This commit is contained in:
Steven Miers 2015-04-29 19:08:59 -05:00
parent 03bab53b2f
commit 2e33851e30
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ require 'spec_helper'
describe 'Band search' do
before(:each) do
Band.delete_all
@bands = []
@bands << @band1 = FactoryGirl.create(:band)
@bands << @band2 = FactoryGirl.create(:band)
@ -31,6 +32,8 @@ describe 'Band search' do
# the ordering should be create_at since no followers exist
expect(Follow.count).to eq(0)
results = Search.band_filter({ :per_page => Band.count })
rbands = @bands.reverse
results.results.each_with_index do |uu, idx|
expect(uu.id).to eq(@bands.reverse[idx].id)
end