Commit 4d53b3d6 authored by Rémy Coutable's avatar Rémy Coutable

Fix a failure in spec/services/system_note_service_spec.rb

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent f0a65ccc
......@@ -947,7 +947,7 @@ describe SystemNoteService do
it 'sets the note text' do
noteable.update_attribute(:time_estimate, 277200)
expect(subject.note).to eq "changed time estimate to 1w 4d 5h"
expect(subject.note).to eq "changed time estimate to 1w 4d 5h,"
end
end
......@@ -984,34 +984,6 @@ describe SystemNoteService do
end
end
describe '.change_time_estimate' do
subject { described_class.change_time_estimate(noteable, project, author) }
it_behaves_like 'a system note' do
let(:action) { 'time_tracking' }
end
context 'with a time estimate' do
it 'sets the note text' do
noteable.update_attribute(:time_estimate, 277200)
expect(subject.note).to eq "changed time estimate to 1w 4d 5h,"
end
it 'appends a comma to separate the note from the update_at time' do
noteable.update_attribute(:time_estimate, 277200)
expect(subject.note).to end_with(',')
end
end
context 'without a time estimate' do
it 'sets the note text' do
expect(subject.note).to eq "removed time estimate"
end
end
end
describe '.change_time_spent' do
# We need a custom noteable in order to the shared examples to be green.
let(:noteable) do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment