From c2dd98764d03dbdce9d0166ee53830e98972b459 Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Fri, 1 Dec 2017 14:52:16 +0100 Subject: Throttle the number of UPDATEs triggered by touch This throttles the number of UPDATE queries that can be triggered by calling "touch" on a Note, Issue, or MergeRequest. For Note objects we also take care of updating the associated "noteable" relation in a smarter way than Rails does by default. --- spec/models/note_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spec/models/note_spec.rb') diff --git a/spec/models/note_spec.rb b/spec/models/note_spec.rb index 6e7e8c4c570..e1a0c55b6a6 100644 --- a/spec/models/note_spec.rb +++ b/spec/models/note_spec.rb @@ -5,7 +5,7 @@ describe Note do describe 'associations' do it { is_expected.to belong_to(:project) } - it { is_expected.to belong_to(:noteable).touch(true) } + it { is_expected.to belong_to(:noteable).touch(false) } it { is_expected.to belong_to(:author).class_name('User') } it { is_expected.to have_many(:todos).dependent(:destroy) } -- cgit v1.2.1