Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
neume committed Jun 11, 2019
1 parent e86b6d9 commit 14a21d3
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
queryko (1.2.2)
queryko (1.2.3)
activerecord (>= 4.0)
activesupport (>= 4.0)

Expand Down
2 changes: 1 addition & 1 deletion spec/lib/queryko/filters/after_spec.rb
Expand Up @@ -18,5 +18,5 @@
end


it { expect(filter.perform(Product.all, index).count).to eq(3) }
it { expect(filter.perform(Product.all, index, nil).count).to eq(3) }
end
2 changes: 1 addition & 1 deletion spec/lib/queryko/filters/before_spec.rb
Expand Up @@ -18,5 +18,5 @@
end


it { expect(filter.perform(Product.all, index).count).to eq(3) }
it { expect(filter.perform(Product.all, index, nil).count).to eq(3) }
end
2 changes: 1 addition & 1 deletion spec/lib/queryko/filters/max_spec.rb
Expand Up @@ -18,5 +18,5 @@
end


it { expect(filter.perform(Product.all, index).count).to eq(4) }
it { expect(filter.perform(Product.all, index, nil).count).to eq(4) }
end
2 changes: 1 addition & 1 deletion spec/lib/queryko/filters/min_spec.rb
Expand Up @@ -18,6 +18,6 @@
end


it { expect(filter.perform(Product.all, index).count).to eq(4) }
it { expect(filter.perform(Product.all, index, nil).count).to eq(4) }
it { expect(filter.field).to eq('id_min') }
end
6 changes: 3 additions & 3 deletions spec/lib/queryko/filters/search_spec.rb
Expand Up @@ -18,19 +18,19 @@
end
end
it { expect(filter.cond).to eq(:like) }
it { expect(filter.perform(Product.all, token).count).to eq(5) }
it { expect(filter.perform(Product.all, token, nil).count).to eq(5) }

describe 'eq' do
let(:token) { 'Product 1' }
let(:cond) { :eq }

it { expect(filter.perform(Product.all, token).count).to eq(1) }
it { expect(filter.perform(Product.all, token, nil).count).to eq(1) }
end

describe 'not' do
let(:token) { 'Product 1' }
let(:cond) { :neq }

it { expect(filter.perform(Product.all, token).count).to eq(4) }
it { expect(filter.perform(Product.all, token, nil).count).to eq(4) }
end
end

0 comments on commit 14a21d3

Please sign in to comment.