aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/arel/update_manager_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2019-04-01 15:04:11 +0900
committerRyuta Kamizono <kamipo@gmail.com>2019-04-01 15:04:11 +0900
commit6e43a207c6d3072d10b494d605b7bb6635043e30 (patch)
treeb2c0ac655273cb2fedc556f62e8f902ed1e0d15c /activerecord/test/cases/arel/update_manager_test.rb
parent43866b2ca338375b964b0b905ee20f74f9b21b22 (diff)
downloadrails-6e43a207c6d3072d10b494d605b7bb6635043e30.tar.gz
rails-6e43a207c6d3072d10b494d605b7bb6635043e30.tar.bz2
rails-6e43a207c6d3072d10b494d605b7bb6635043e30.zip
Revert unused code and re-using query annotation for `update_all` and `delete_all`
This partly reverts #35617. #35617 includes unused code (for `InsertStatement`) and re-using query annotation for `update_all` and `delete_all`, which has not been discussed yet. If a relation has any annotation, I think it is mostly for SELECT query, so re-using annotation by default is not always desired behavior for me. We should discuss about desired behavior before publishing the implementation.
Diffstat (limited to 'activerecord/test/cases/arel/update_manager_test.rb')
-rw-r--r--activerecord/test/cases/arel/update_manager_test.rb24
1 files changed, 0 insertions, 24 deletions
diff --git a/activerecord/test/cases/arel/update_manager_test.rb b/activerecord/test/cases/arel/update_manager_test.rb
index e13cb6aa52..cc1b9ac5b3 100644
--- a/activerecord/test/cases/arel/update_manager_test.rb
+++ b/activerecord/test/cases/arel/update_manager_test.rb
@@ -122,29 +122,5 @@ module Arel
@um.key.must_equal @table[:foo]
end
end
-
- describe "comment" do
- it "chains" do
- manager = Arel::UpdateManager.new
- manager.comment("updating").must_equal manager
- end
-
- it "appends a comment to the generated query" do
- table = Table.new :users
-
- manager = Arel::UpdateManager.new
- manager.table table
-
- manager.comment("updating")
- manager.to_sql.must_be_like %{
- UPDATE "users" /* updating */
- }
-
- manager.comment("updating", "with", "comment")
- manager.to_sql.must_be_like %{
- UPDATE "users" /* updating */ /* with */ /* comment */
- }
- end
- end
end
end