Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-02-17 12:25:34 +0300
committerRémy Coutable <remy@rymai.me>2017-02-17 12:34:43 +0300
commit5a0027236bd424ec9178d846c94092dfac419ec1 (patch)
tree33049f88e1ae3f731cae3f3f4a9f663cde006383 /spec/lib/gitlab/slash_commands
parentb08be1659826ae3f0b645334e59f0a2861a709eb (diff)
Allow slashes in slash command arguments
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/lib/gitlab/slash_commands')
-rw-r--r--spec/lib/gitlab/slash_commands/extractor_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/slash_commands/extractor_spec.rb b/spec/lib/gitlab/slash_commands/extractor_spec.rb
index 1e4954c4af8..d7f77486b3e 100644
--- a/spec/lib/gitlab/slash_commands/extractor_spec.rb
+++ b/spec/lib/gitlab/slash_commands/extractor_spec.rb
@@ -81,6 +81,14 @@ describe Gitlab::SlashCommands::Extractor do
let(:original_msg) { "/assign @joe\nworld" }
let(:final_msg) { "world" }
end
+
+ it 'allows slash in command arguments' do
+ msg = "/assign @joe / @jane\nworld"
+ msg, commands = extractor.extract_commands(msg)
+
+ expect(commands).to eq [['assign', '@joe / @jane']]
+ expect(msg).to eq 'world'
+ end
end
context 'in the middle of content' do