diff options
author | Jochen Topf <jochen@topf.org> | 2013-01-11 10:08:37 +0100 |
---|---|---|
committer | Jochen Topf <jochen@topf.org> | 2013-01-11 10:08:37 +0100 |
commit | 3df767aa62268e209a4c0749f82aa594919a0af5 (patch) | |
tree | 06d5426eb06226a380afc6013408132c9720a568 | |
parent | 61b0fe938df7d8ddf65671222ac618a637059460 (diff) | |
download | taginfo-3df767aa62268e209a4c0749f82aa594919a0af5.tar taginfo-3df767aa62268e209a4c0749f82aa594919a0af5.tar.gz |
Fix tests
-rw-r--r-- | web/test/test_sql.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/web/test/test_sql.rb b/web/test/test_sql.rb index 4ff7ca0..f8eea7b 100644 --- a/web/test/test_sql.rb +++ b/web/test/test_sql.rb @@ -10,33 +10,33 @@ class TestSql < Test::Unit::TestCase def test_order_by_no_block assert_kind_of SQL::Select, @select - @select.order_by(:foo) + @select.order_by(:foo, 'ASC') assert_equal 'test ORDER BY foo ASC', @select.build_query end def test_order_by_no_block_desc assert_kind_of SQL::Select, @select - @select.order_by(:foo, :desc) + @select.order_by(:foo, 'DESC') assert_equal 'test ORDER BY foo DESC', @select.build_query end def test_order_by_simple assert_kind_of SQL::Select, @select - @select.order_by(:foo) do |o| + @select.order_by(:foo, 'ASC') do |o| o.foo end assert_equal 'test ORDER BY foo ASC', @select.build_query end def test_order_by_desc - @select.order_by(:foo, 'desc') do |o| + @select.order_by(:foo, 'DESC') do |o| o.foo end assert_equal 'test ORDER BY foo DESC', @select.build_query end def test_order_by_unused - @select.order_by([:foo]) do |o| + @select.order_by([:foo], 'ASC') do |o| o.foo o.bar! 'baz' end @@ -44,7 +44,7 @@ class TestSql < Test::Unit::TestCase end def test_order_by_reverse - @select.order_by(:bar) do |o| + @select.order_by(:bar, 'ASC') do |o| o.foo o.bar! 'baz' end @@ -52,7 +52,7 @@ class TestSql < Test::Unit::TestCase end def test_order_by_array - @select.order_by([:foo, 'bar']) do |o| + @select.order_by([:foo, 'bar'], 'ASC') do |o| o.bar! 'baz' o.foo end @@ -68,7 +68,7 @@ class TestSql < Test::Unit::TestCase end def test_order_by_array_multiple - @select.order_by([:bar, :foo], :DESC) do |o| + @select.order_by([:bar, :foo], 'DESC') do |o| o.foo 'f1' o.foo! :f2 o.bar :baz @@ -77,7 +77,7 @@ class TestSql < Test::Unit::TestCase end def test_order_by_map - @select.order_by(:length) do |o| + @select.order_by(:length, 'ASC') do |o| o.length 'length(foo)' o.length :foo end |