blob: 7f123eab13559be84a8aa276c6558872b3504b4d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
require 'helper'
module Arel
module Nodes
class TestBin < MiniTest::Unit::TestCase
def test_new
assert Arel::Nodes::Bin.new('zomg')
end
def test_default_to_sql
viz = Arel::Visitors::ToSql.new Table.engine.connection_pool
node = Arel::Nodes::Bin.new(Arel.sql('zomg'))
assert_equal 'zomg', viz.accept(node)
end
def test_mysql_to_sql
viz = Arel::Visitors::MySQL.new Table.engine.connection_pool
node = Arel::Nodes::Bin.new(Arel.sql('zomg'))
assert_equal 'BINARY zomg', viz.accept(node)
end
end
end
end
|