diff options
author | Stan Hu <stanhu@gmail.com> | 2017-08-09 15:57:52 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2017-08-09 15:57:52 -0700 |
commit | 09baadca349670822645b56a17e9bf8716e997b6 (patch) | |
tree | 397bb26f3a0e851b39c57351cbe6963adc47dea8 /spec/support/features | |
parent | ded77e21b38dbb65aec2aeae42de02e6571fe01a (diff) | |
parent | 2925850ceec3ef89eb1f60b0a648dbc5f72d8683 (diff) | |
download | gitlab-ce-09baadca349670822645b56a17e9bf8716e997b6.tar.gz |
Merge branch 'master' into sh-headless-chrome-support
Diffstat (limited to 'spec/support/features')
-rw-r--r-- | spec/support/features/issuable_slash_commands_shared_examples.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/spec/support/features/issuable_slash_commands_shared_examples.rb b/spec/support/features/issuable_slash_commands_shared_examples.rb index 035428a7d9b..68f0ce8afb3 100644 --- a/spec/support/features/issuable_slash_commands_shared_examples.rb +++ b/spec/support/features/issuable_slash_commands_shared_examples.rb @@ -5,7 +5,14 @@ shared_examples 'issuable record that supports quick actions in its description include QuickActionsHelpers let(:master) { create(:user) } - let(:project) { create(:project, :public) } + let(:project) do + case issuable_type + when :merge_request + create(:project, :public, :repository) + when :issue + create(:project, :public) + end + end let!(:milestone) { create(:milestone, project: project, title: 'ASAP') } let!(:label_bug) { create(:label, project: project, title: 'bug') } let!(:label_feature) { create(:label, project: project, title: 'feature') } @@ -272,6 +279,17 @@ shared_examples 'issuable record that supports quick actions in its description expect(issuable.subscribed?(master, project)).to be_falsy end end + + context "with a note assigning the #{issuable_type} to the current user" do + it "assigns the #{issuable_type} to the current user" do + write_note("/assign me") + + expect(page).not_to have_content '/assign me' + expect(page).to have_content 'Commands applied' + + expect(issuable.reload.assignees).to eq [master] + end + end end describe "preview of note on #{issuable_type}" do |