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_select_manager.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_select_manager.rb')
-rw-r--r-- | test/test_select_manager.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb index 9a225edeec..e88f0e8e11 100644 --- a/test/test_select_manager.rb +++ b/test/test_select_manager.rb @@ -618,6 +618,16 @@ module Arel manager = Arel::SelectManager.new manager.join(nil).must_equal manager end + + it 'raises EmptyJoinError on empty' do + left = Table.new :users + manager = Arel::SelectManager.new + + manager.from left + assert_raises(EmptyJoinError) do + manager.join("") + end + end end describe 'outer join' do |