diff options
author | Willian Gustavo Veiga <beberveiga@gmail.com> | 2018-08-13 22:18:53 -0300 |
---|---|---|
committer | Willian Gustavo Veiga <willian.veiga@tnh.health> | 2018-08-13 22:19:39 -0300 |
commit | 00c50c2b5966fa1d719c8a58564811c672a0e8c6 (patch) | |
tree | 9d1fc5763be1e3690884310e1bccb054abe3d860 /activerecord/test/cases/relation/select_test.rb | |
parent | 3000c1490565b3a21376d6444cb6fe24dfe4e383 (diff) | |
download | rails-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.rb | 5 |
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 |