diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /spec/services/notes/quick_actions_service_spec.rb | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'spec/services/notes/quick_actions_service_spec.rb')
-rw-r--r-- | spec/services/notes/quick_actions_service_spec.rb | 16 |
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 |