aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_table.rb
diff options
context:
space:
mode:
authorDaniel Colson <danieljamescolson@gmail.com>2017-01-17 23:13:37 -0500
committerDaniel Colson <danieljamescolson@gmail.com>2017-01-17 23:13:37 -0500
commit33d0d962b777a98f3bdda0be41ee03acc0410676 (patch)
treebd238ddda782d8918d9b798761cc7696e3ec6d94 /test/test_table.rb
parentab109d3bf1c773da5e78ddc93bb6b55aebbb1c2a (diff)
downloadrails-33d0d962b777a98f3bdda0be41ee03acc0410676.tar.gz
rails-33d0d962b777a98f3bdda0be41ee03acc0410676.tar.bz2
rails-33d0d962b777a98f3bdda0be41ee03acc0410676.zip
Raise custom error on empty join
Diffstat (limited to 'test/test_table.rb')
-rw-r--r--test/test_table.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_table.rb b/test/test_table.rb
index 168fde370d..e36a6e3a41 100644
--- a/test/test_table.rb
+++ b/test/test_table.rb
@@ -71,6 +71,12 @@ module Arel
mgr.to_sql.must_be_like %{ SELECT FROM "users" }
end
+ it 'raises EmptyJoinError on empty' do
+ assert_raises(EmptyJoinError) do
+ @relation.join ""
+ end
+ end
+
it 'takes a second argument for join type' do
right = @relation.alias
predicate = @relation[:id].eq(right[:id])