summaryrefslogtreecommitdiff
path: root/spec/factories
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2016-09-08 10:57:03 +0000
committerRuben Davila <rdavila84@gmail.com>2016-09-13 20:57:22 -0500
commite708b91de6d669be4f7ed12c12b4d71fe2806cfd (patch)
treea44231c672d2ff800e3d8d1f958206ed601a6252 /spec/factories
parent629e21c0106e80ec0b619fc981408dda11d1e7a1 (diff)
downloadgitlab-ce-e708b91de6d669be4f7ed12c12b4d71fe2806cfd.tar.gz
Merge branch '21109-discussion-resolve-runs-a-single-update-query-per-note-but-should-run-a-single-update-query-for-all-notes-instead' into 'master'
Optimize discussion notes resolving and unresolving ## What does this MR do? Optimize discussion notes resolving and unresolving ## Are there points in the code the reviewer needs to double check? Some changes had to be made to the discussion spec to account for the fact that notes are not individually updated now. I only focused on adapting them for the purpose of the regression fix, but admittedly they could be further improved in readability. ## Does this MR meet the acceptance criteria? - [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added - [ ] [Documentation created/updated](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/development/doc_styleguide.md) - [ ] API support added - Tests - [x] Added for this feature/bug - [x] All builds are passing - [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides) - [ ] Branch has no merge conflicts with `master` (if you do - rebase it please) - [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits) ## What are the relevant issue numbers? Closes #21109 See merge request !6141
Diffstat (limited to 'spec/factories')
-rw-r--r--spec/factories/notes.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/factories/notes.rb b/spec/factories/notes.rb
index 83e38095feb..6919002dedc 100644
--- a/spec/factories/notes.rb
+++ b/spec/factories/notes.rb
@@ -28,6 +28,11 @@ FactoryGirl.define do
diff_refs: noteable.diff_refs
)
end
+
+ trait :resolved do
+ resolved_at { Time.now }
+ resolved_by { create(:user) }
+ end
end
factory :diff_note_on_commit, traits: [:on_commit], class: DiffNote do