spec/conceptql/nodes/casting_node_spec.rb in conceptql-0.0.6 vs spec/conceptql/nodes/casting_node_spec.rb in conceptql-0.0.7

- old
+ new

@@ -47,26 +47,25 @@ it 'uses castable types if possible' do stream = StreamForCastingDouble.new stream.types = [:i_point1] sql = CastingDouble.new(stream).query(Sequel.mock).sql - sql.must_match 'my_type_id IN' - sql.must_match 'GROUP BY i_point1_id' + sql.must_match 'i_point1_id IN' + sql.must_match "criterion_type = 'i_point1'" end it 'uses and unions multiple castable types if possible' do stream = StreamForCastingDouble.new stream.types = [:i_point1, :at_me2] sql = CastingDouble.new(stream).query(Sequel.mock).sql sql.must_match 'my_type_id IN' - sql.must_match 'GROUP BY i_point1_id' - sql.must_match 'GROUP BY at_me2_id' - sql.must_match 'UNION' + sql.must_match 'i_point1_id IN' + sql.must_match "criterion_type = 'i_point1'" end it 'returns all rows of a table if passed the argument "true"' do sql = CastingDouble.new(true).query(Sequel.mock).sql - sql.must_match "SELECT * FROM my_type_with_dates AS tab" + sql.must_match "SELECT * FROM my_type AS tab" end end end