diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 15:07:33 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-12 15:07:33 +0300 |
commit | 784fae4b9d7e92350075df2a43d06893080ed1e6 (patch) | |
tree | c7a6fd444acd6897622b233b250a34fd176f01da /spec/lib/gitlab/slash_commands | |
parent | fc53ce8e6ca67bf217470179a1ea6cf139bcffad (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/lib/gitlab/slash_commands')
-rw-r--r-- | spec/lib/gitlab/slash_commands/command_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/issue_search_spec.rb | 1 | ||||
-rw-r--r-- | spec/lib/gitlab/slash_commands/presenters/issue_comment_spec.rb | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/spec/lib/gitlab/slash_commands/command_spec.rb b/spec/lib/gitlab/slash_commands/command_spec.rb index 5a8c721a634..73b93589fac 100644 --- a/spec/lib/gitlab/slash_commands/command_spec.rb +++ b/spec/lib/gitlab/slash_commands/command_spec.rb @@ -113,11 +113,13 @@ describe Gitlab::SlashCommands::Command do context 'IssueMove is triggered' do let(:params) { { text: 'issue move #78291 to gitlab/gitlab-ci' } } + it { is_expected.to eq(Gitlab::SlashCommands::IssueMove) } end context 'IssueComment is triggered' do let(:params) { { text: "issue comment #503\ncomment body" } } + it { is_expected.to eq(Gitlab::SlashCommands::IssueComment) } end end diff --git a/spec/lib/gitlab/slash_commands/issue_search_spec.rb b/spec/lib/gitlab/slash_commands/issue_search_spec.rb index b766a9a1361..a142c8e4c92 100644 --- a/spec/lib/gitlab/slash_commands/issue_search_spec.rb +++ b/spec/lib/gitlab/slash_commands/issue_search_spec.rb @@ -42,6 +42,7 @@ describe Gitlab::SlashCommands::IssueSearch do describe 'self.match' do let(:query) { "my search keywords" } + it 'matches the query' do match = described_class.match("issue search #{query}") diff --git a/spec/lib/gitlab/slash_commands/presenters/issue_comment_spec.rb b/spec/lib/gitlab/slash_commands/presenters/issue_comment_spec.rb index b5ef417cb93..3741563a744 100644 --- a/spec/lib/gitlab/slash_commands/presenters/issue_comment_spec.rb +++ b/spec/lib/gitlab/slash_commands/presenters/issue_comment_spec.rb @@ -10,6 +10,7 @@ describe Gitlab::SlashCommands::Presenters::IssueComment do describe '#present' do let(:attachment) { subject[:attachments].first } + subject { described_class.new(note).present } it { is_expected.to be_a(Hash) } |