spec/unit/function_spec.rb in rom-sql-1.3.2 vs spec/unit/function_spec.rb in rom-sql-1.3.3

- old
+ new

@@ -36,6 +36,13 @@ it 'raises error when is set already' do expect { func.count(:id).upper.sql_literal(ds) }. to raise_error(NoMethodError, /upper/) end end + + describe '#cast' do + it 'transforms data' do + expect(func.cast(:id, 'varchar').sql_literal(ds)). + to eql(%(CAST("id" AS varchar(255)))) + end + end end