diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2017-12-01 14:52:16 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2017-12-06 15:59:37 +0100 |
commit | 856447ccd305832c4e9421ab9e81d63eea348203 (patch) | |
tree | 99df49e2050a3dcb2f2d289a8a728fa5b28f83be /spec/models/concerns/issuable_spec.rb | |
parent | 483b5f1bfac5e338fab0e11f2045254f70df8fc1 (diff) | |
download | gitlab-ce-856447ccd305832c4e9421ab9e81d63eea348203.tar.gz |
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.
Diffstat (limited to 'spec/models/concerns/issuable_spec.rb')
-rw-r--r-- | spec/models/concerns/issuable_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/models/concerns/issuable_spec.rb b/spec/models/concerns/issuable_spec.rb index a53b59c4e08..9df26f06a11 100644 --- a/spec/models/concerns/issuable_spec.rb +++ b/spec/models/concerns/issuable_spec.rb @@ -171,7 +171,7 @@ describe Issuable do it "returns false when record has been updated" do allow(issue).to receive(:today?).and_return(true) - issue.touch + issue.update_attribute(:updated_at, 1.hour.ago) expect(issue.new?).to be_falsey end end |