summaryrefslogtreecommitdiff
path: root/lib/gitlab/chat_commands/issue_create.rb
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2016-11-17 15:30:04 +0100
committerZ.J. van de Weg <git@zjvandeweg.nl>2016-11-17 21:34:24 +0100
commit1607efa40081702488e22e560db2c1e30cd80093 (patch)
treee43388424e05c45eee6cf2ddef9f7e538327019b /lib/gitlab/chat_commands/issue_create.rb
parent6737ada0c8d980ed1bd8f425e885fa1b89930616 (diff)
downloadgitlab-ce-1607efa40081702488e22e560db2c1e30cd80093.tar.gz
Add tests for increased converage
Diffstat (limited to 'lib/gitlab/chat_commands/issue_create.rb')
-rw-r--r--lib/gitlab/chat_commands/issue_create.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/chat_commands/issue_create.rb b/lib/gitlab/chat_commands/issue_create.rb
index 0e2b4c0e9cd..1e311e09771 100644
--- a/lib/gitlab/chat_commands/issue_create.rb
+++ b/lib/gitlab/chat_commands/issue_create.rb
@@ -1,6 +1,6 @@
module Gitlab
module ChatCommands
- class IssueCreate < IssueCommand
+ class IssueCreate < IssueCommand
def self.match(text)
/\Aissue\s+create\s+(?<title>[^\n]*)\n*(?<description>.*)\z/.match(text)
end
@@ -10,12 +10,12 @@ module Gitlab
end
def execute(match)
- present nil unless can?(current_user, :create_issue, project)
+ return nil unless can?(current_user, :create_issue, project)
title = match[:title]
description = match[:description]
- present Issues::CreateService.new(project, current_user, title: title, description: description).execute
+ Issues::CreateService.new(project, current_user, title: title, description: description).execute
end
end
end