diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-02-22 18:34:04 +0100 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-02-23 14:37:53 +0100 |
commit | 57719d34d3fcc15f39354b0e9dc1da41bbe5d1a8 (patch) | |
tree | 255d9a3df371793748c64792a715102dca98512c /spec/lib/gitlab/slash_commands/issue_new_spec.rb | |
parent | c679fa163148601e77803f45cf5dea8e1b3feb0a (diff) | |
download | gitlab-ce-57719d34d3fcc15f39354b0e9dc1da41bbe5d1a8.tar.gz |
Expose ChatName objects to slash commandsslash-commands-changes-for-chatops
Instead of only exposing a User to slash commands we now also expose the
ChatName object that the User object is retrieved from. This is
necessary for GitLab Chatops as we need for example the user ID of the
chat user.
Diffstat (limited to 'spec/lib/gitlab/slash_commands/issue_new_spec.rb')
-rw-r--r-- | spec/lib/gitlab/slash_commands/issue_new_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/lib/gitlab/slash_commands/issue_new_spec.rb b/spec/lib/gitlab/slash_commands/issue_new_spec.rb index 3b077c58c50..8e7df946529 100644 --- a/spec/lib/gitlab/slash_commands/issue_new_spec.rb +++ b/spec/lib/gitlab/slash_commands/issue_new_spec.rb @@ -4,6 +4,7 @@ describe Gitlab::SlashCommands::IssueNew do describe '#execute' do let(:project) { create(:project) } let(:user) { create(:user) } + let(:chat_name) { double(:chat_name, user: user) } let(:regex_match) { described_class.match("issue create bird is the word") } before do @@ -11,7 +12,7 @@ describe Gitlab::SlashCommands::IssueNew do end subject do - described_class.new(project, user).execute(regex_match) + described_class.new(project, chat_name).execute(regex_match) end context 'without description' do |