aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_select_manager.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-08-11 08:51:13 +0100
committerJon Leighton <j@jonathanleighton.com>2011-08-11 21:47:30 +0100
commit34bd53ba015b8f9bca77172784e62994487eef9b (patch)
tree1ecf4443fd6a71db850b86d1d7f9667bd6aa09f4 /test/test_select_manager.rb
parent88c91f7cdbe904c0a215a05be76ae120eacb24fb (diff)
downloadrails-34bd53ba015b8f9bca77172784e62994487eef9b.tar.gz
rails-34bd53ba015b8f9bca77172784e62994487eef9b.tar.bz2
rails-34bd53ba015b8f9bca77172784e62994487eef9b.zip
Add SelectManager#source method to get the source of the ctx
Diffstat (limited to 'test/test_select_manager.rb')
-rw-r--r--test/test_select_manager.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_select_manager.rb b/test/test_select_manager.rb
index ada0f1423d..6603102a3a 100644
--- a/test/test_select_manager.rb
+++ b/test/test_select_manager.rb
@@ -956,5 +956,13 @@ module Arel
manager.to_sql.must_be_like 'SELECT "users"."id" FROM "users"'
end
end
+
+ describe 'source' do
+ it 'returns the join source of the select core' do
+ table = Table.new :users
+ manager = Arel::SelectManager.new Table.engine
+ manager.source.must_equal manager.ast.cores.last.source
+ end
+ end
end
end