spec/ransack_spec.rb in nql-0.1.0 vs spec/ransack_spec.rb in nql-0.1.1
- old
+ new
@@ -60,9 +60,17 @@
q[:c][0].should have_attribute 'id'
q[:c][0].should have_predicate 'cont'
q[:c][0].should have_value '1234'
end
+ it 'Not contains' do
+ q = parser.parse('id !: 1234').to_ransack
+
+ q[:c][0].should have_attribute 'id'
+ q[:c][0].should have_predicate 'not_cont'
+ q[:c][0].should have_value '1234'
+ end
+
it 'Matches' do
q = parser.parse('id ~ 1234').to_ransack
q[:c][0].should have_attribute 'id'
q[:c][0].should have_predicate 'matches'
\ No newline at end of file