diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-01-17 23:53:27 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-17 23:53:27 -0500 |
commit | f5f81be73df89011fe9bc89915b99d81e0c9a67f (patch) | |
tree | bd238ddda782d8918d9b798761cc7696e3ec6d94 /test/test_table.rb | |
parent | ab109d3bf1c773da5e78ddc93bb6b55aebbb1c2a (diff) | |
parent | 33d0d962b777a98f3bdda0be41ee03acc0410676 (diff) | |
download | rails-f5f81be73df89011fe9bc89915b99d81e0c9a67f.tar.gz rails-f5f81be73df89011fe9bc89915b99d81e0c9a67f.tar.bz2 rails-f5f81be73df89011fe9bc89915b99d81e0c9a67f.zip |
Merge pull request #467 from composerinteralia/custom-errors
Raise custom error on empty join
Diffstat (limited to 'test/test_table.rb')
-rw-r--r-- | test/test_table.rb | 6 |
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]) |