aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/relation/select_test.rb
diff options
context:
space:
mode:
authorWillian Gustavo Veiga <beberveiga@gmail.com>2018-08-13 22:18:53 -0300
committerWillian Gustavo Veiga <willian.veiga@tnh.health>2018-08-13 22:19:39 -0300
commit00c50c2b5966fa1d719c8a58564811c672a0e8c6 (patch)
tree9d1fc5763be1e3690884310e1bccb054abe3d860 /activerecord/test/cases/relation/select_test.rb
parent3000c1490565b3a21376d6444cb6fe24dfe4e383 (diff)
downloadrails-00c50c2b5966fa1d719c8a58564811c672a0e8c6.tar.gz
rails-00c50c2b5966fa1d719c8a58564811c672a0e8c6.tar.bz2
rails-00c50c2b5966fa1d719c8a58564811c672a0e8c6.zip
Add reselect method
Diffstat (limited to 'activerecord/test/cases/relation/select_test.rb')
-rw-r--r--activerecord/test/cases/relation/select_test.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/cases/relation/select_test.rb b/activerecord/test/cases/relation/select_test.rb
index dec8a6925d..32e8f473ff 100644
--- a/activerecord/test/cases/relation/select_test.rb
+++ b/activerecord/test/cases/relation/select_test.rb
@@ -11,5 +11,10 @@ module ActiveRecord
expected = Post.select(:title).to_sql
assert_equal expected, Post.select(nil).select(:title).to_sql
end
+
+ def test_reselect
+ expected = Post.select(:title).to_sql
+ assert_equal expected, Post.select(:title, :body).reselect(:title).to_sql
+ end
end
end