Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-02-06 09:11:33 +0300
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-02-13 10:15:51 +0300
commita7b1a4ef1ef0b466423b89472c362341f3749cdc (patch)
tree15d6073bcb2d29c0cebbcce22daab919cfb1e854 /spec/services/notes
parent032e800b93dfe36604d896f2128ea05ad1330ece (diff)
Fix polling for transformed individual notes
Sets `updated_at` so that the transformed note is returned together with the new reply
Diffstat (limited to 'spec/services/notes')
-rw-r--r--spec/services/notes/create_service_spec.rb9
1 files changed, 8 insertions, 1 deletions
diff --git a/spec/services/notes/create_service_spec.rb b/spec/services/notes/create_service_spec.rb
index 48f1d696ff6..1645b67c329 100644
--- a/spec/services/notes/create_service_spec.rb
+++ b/spec/services/notes/create_service_spec.rb
@@ -311,7 +311,14 @@ describe Notes::CreateService do
end
it 'converts existing note to DiscussionNote' do
- expect { subject }.to change { existing_note.reload.type }.from(nil).to('DiscussionNote')
+ expect do
+ existing_note
+
+ Timecop.freeze(Time.now + 1.minute) { subject }
+
+ existing_note.reload
+ end.to change { existing_note.type }.from(nil).to('DiscussionNote')
+ .and change { existing_note.updated_at }
end
end
end