Commit 2393d30d authored by Z.J. van de Weg's avatar Z.J. van de Weg

Fix rubocop errors [ci skip]

parent e9c14918
...@@ -24,13 +24,13 @@ class MattermostSlashCommandsService < ChatSlashCommandsService ...@@ -24,13 +24,13 @@ class MattermostSlashCommandsService < ChatSlashCommandsService
create(command(params)) create(command(params))
update(active: true, token: token) if token update(active: true, token: token) if token
rescue => Mattermost::Error => e rescue Mattermost::Error => e
false, e.message [false, e.message]
end end
def list_teams(user) def list_teams(user)
Mattermost::Team.new(user).all Mattermost::Team.new(user).all
rescue => Mattermost::Error => e rescue Mattermost::Error
[] []
end end
......
...@@ -34,7 +34,7 @@ module Mattermost ...@@ -34,7 +34,7 @@ module Mattermost
end end
json_response json_response
rescue JSON::JSONError => e rescue JSON::JSONError
raise ClientError('Cannot parse response') raise ClientError('Cannot parse response')
end end
end end
......
...@@ -41,7 +41,6 @@ feature 'Setup Mattermost slash commands', feature: true do ...@@ -41,7 +41,6 @@ feature 'Setup Mattermost slash commands', feature: true do
end end
end end
describe 'mattermost service is not enabled' do describe 'mattermost service is not enabled' do
before do before do
allow(Gitlab.config.mattermost).to receive(:enabled).and_return(false) allow(Gitlab.config.mattermost).to receive(:enabled).and_return(false)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment