summaryrefslogtreecommitdiff
path: root/spec/services/notes/quick_actions_service_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/services/notes/quick_actions_service_spec.rb')
-rw-r--r--spec/services/notes/quick_actions_service_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/services/notes/quick_actions_service_spec.rb b/spec/services/notes/quick_actions_service_spec.rb
index 9692bb08379..cb7d0163cac 100644
--- a/spec/services/notes/quick_actions_service_spec.rb
+++ b/spec/services/notes/quick_actions_service_spec.rb
@@ -130,6 +130,17 @@ RSpec.describe Notes::QuickActionsService do
end
end
+ describe '/estimate' do
+ let(:note_text) { '/estimate 1h' }
+
+ it 'adds time estimate to noteable' do
+ content = execute(note)
+
+ expect(content).to be_empty
+ expect(note.noteable.time_estimate).to eq(3600)
+ end
+ end
+
describe 'note with command & text' do
describe '/close, /label, /assign & /milestone' do
let(:note_text) do
@@ -302,6 +313,11 @@ RSpec.describe Notes::QuickActionsService do
end
it_behaves_like 'note on noteable that supports quick actions' do
+ let_it_be(:incident, reload: true) { create(:incident, project: project) }
+ let(:note) { build(:note_on_issue, project: project, noteable: incident) }
+ end
+
+ it_behaves_like 'note on noteable that supports quick actions' do
let(:merge_request) { create(:merge_request, source_project: project) }
let(:note) { build(:note_on_merge_request, project: project, noteable: merge_request) }
end