aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_select_manager.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_select_manager.rb')
-rw-r--r--test/test_select_manager.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb
index a00d1843ba..bd5a4be68b 100644
--- a/test/test_select_manager.rb
+++ b/test/test_select_manager.rb
@@ -981,5 +981,18 @@ module Arel
manager.source.must_equal manager.ast.cores.last.source
end
end
+
+ describe 'distinct' do
+ it 'sets the quantifier' do
+ table = Table.new :users
+ manager = Arel::SelectManager.new Table.engine
+
+ manager.distinct
+ manager.ast.cores.last.set_quantifier.class.must_equal Arel::Nodes::Distinct
+
+ manager.distinct(false)
+ manager.ast.cores.last.set_quantifier.must_equal nil
+ end
+ end
end
end