summaryrefslogtreecommitdiff
path: root/spec/services/note_summary_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/note_summary_spec.rb')
-rw-r--r--spec/services/note_summary_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/services/note_summary_spec.rb b/spec/services/note_summary_spec.rb
index aa4e41f4d8c..038e0cdb703 100644
--- a/spec/services/note_summary_spec.rb
+++ b/spec/services/note_summary_spec.rb
@@ -25,18 +25,18 @@ describe NoteSummary do
it 'returns note hash' do
Timecop.freeze do
expect(create_note_summary.note).to eq(noteable: noteable, project: project, author: user, note: 'note',
- created_at: Time.now)
+ created_at: Time.current)
end
end
context 'when noteable is a commit' do
- let(:noteable) { build(:commit, system_note_timestamp: Time.at(43)) }
+ let(:noteable) { build(:commit, system_note_timestamp: Time.zone.at(43)) }
it 'returns note hash specific to commit' do
expect(create_note_summary.note).to eq(
noteable: nil, project: project, author: user, note: 'note',
noteable_type: 'Commit', commit_id: noteable.id,
- created_at: Time.at(43)
+ created_at: Time.zone.at(43)
)
end
end