Browse files

changes comparsion from 'like', which is invalid to 'matches'

  • Loading branch information...
1 parent 182012d commit 1eea1500cf6fe4a720ad087e252c1e0dd1395c90 @pschyska committed Jan 29, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 test/basepack_test_app/spec/data_adapter/adapter_spec.rb
View
4 test/basepack_test_app/spec/data_adapter/adapter_spec.rb
@@ -48,11 +48,11 @@ class Book
end
it "should report correct record count when filters are specified" do
- @adapter.count_records({:filter=>ActiveSupport::JSON.encode([{'field' => 'title', 'value' => 'Journ', 'type' => 'string', 'comparsion' => 'like' }])}).should == 1
+ @adapter.count_records({:filter=>ActiveSupport::JSON.encode([{'field' => 'title', 'value' => 'Journ', 'type' => 'string', 'comparsion' => 'matches' }])}).should == 1
end
it "should report correct record count when filters on association columns are specified" do
- @adapter.count_records({:filter=>ActiveSupport::JSON.encode([{'field' => 'author__last_name', 'value' => 'Cast', 'type' => 'string', 'comparsion' => 'like' }])},[{:name => 'author__last_name'}]).should == 3
+ @adapter.count_records({:filter=>ActiveSupport::JSON.encode([{'field' => 'author__last_name', 'value' => 'Cast', 'type' => 'string', 'comparsion' => 'matches' }])},[{:name => 'author__last_name'}]).should == 3
end
# TODO: test scope and query for assoc columns and non-assoc columns

0 comments on commit 1eea150

Please sign in to comment.