summaryrefslogtreecommitdiff
path: root/spec/services/notes/create_service_spec.rb
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-02-06 14:11:33 +0800
committerHeinrich Lee Yu <heinrich@gitlab.com>2019-02-13 15:15:51 +0800
commita7b1a4ef1ef0b466423b89472c362341f3749cdc (patch)
tree15d6073bcb2d29c0cebbcce22daab919cfb1e854 /spec/services/notes/create_service_spec.rb
parent032e800b93dfe36604d896f2128ea05ad1330ece (diff)
downloadgitlab-ce-a7b1a4ef1ef0b466423b89472c362341f3749cdc.tar.gz
Fix polling for transformed individual notes30299-fix-polling-for-transformed-notes
Sets `updated_at` so that the transformed note is returned together with the new reply
Diffstat (limited to 'spec/services/notes/create_service_spec.rb')
-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