spec/ransack_spec.rb in nql-0.1.1 vs spec/ransack_spec.rb in nql-0.1.2

- old
+ new

@@ -78,10 +78,23 @@ q[:c][0].should have_value '1234' end it 'Model references' do q = parser.parse('models.id = 1234').to_ransack + q[:c][0].should have_attribute 'models_id' + q[:c][0].should have_predicate 'eq' + q[:c][0].should have_value '1234' + end + it 'Single comparison with parentheses and spaces' do + q = parser.parse('( models.id = 1234 )').to_ransack + q[:c][0].should have_attribute 'models_id' + q[:c][0].should have_predicate 'eq' + q[:c][0].should have_value '1234' + end + + it 'Single comparison with parentheses' do + q = parser.parse('(models.id = 1234)').to_ransack q[:c][0].should have_attribute 'models_id' q[:c][0].should have_predicate 'eq' q[:c][0].should have_value '1234' end \ No newline at end of file