fix rubocop offenses

This commit is contained in:
Maja Komel 2017-10-17 12:21:36 +02:00
parent 92d6a6ba0e
commit 7889691cdb
2 changed files with 6 additions and 6 deletions

View File

@ -30,11 +30,11 @@ module DiscourseChat::Provider::FlowdockProvider
message = { message = {
flow_token: flow_token, flow_token: flow_token,
event: "discussion", event: "discussion",
author: { author: {
name: display_name, name: display_name,
avatar: post.user.small_avatar_url avatar: post.user.small_avatar_url
}, },
title: I18n.t("chat_integration.provider.flowdock.message_title"), title: I18n.t("chat_integration.provider.flowdock.message_title"),
external_thread_id: post.topic.id, external_thread_id: post.topic.id,
body: post.excerpt(SiteSetting.chat_integration_flowdock_excerpt_length, text_entities: true, strip_links: false, remap_emoji: true), body: post.excerpt(SiteSetting.chat_integration_flowdock_excerpt_length, text_entities: true, strip_links: false, remap_emoji: true),
thread: { thread: {
@ -56,4 +56,4 @@ module DiscourseChat::Provider::FlowdockProvider
raise ::DiscourseChat::ProviderError.new info: { error_key: error_key, message: message, response_body: response.body } raise ::DiscourseChat::ProviderError.new info: { error_key: error_key, message: message, response_body: response.body }
end end
end end
end end

View File

@ -8,7 +8,7 @@ RSpec.describe DiscourseChat::Provider::FlowdockProvider do
SiteSetting.chat_integration_flowdock_enabled = true SiteSetting.chat_integration_flowdock_enabled = true
end end
let(:chan1) { DiscourseChat::Channel.create!(provider: 'flowdock', data: { flow_token: '5d1fe04cf66e078d6a2b579ddb8a465b'}) } let(:chan1) { DiscourseChat::Channel.create!(provider: 'flowdock', data: { flow_token: '5d1fe04cf66e078d6a2b579ddb8a465b' }) }
it 'sends a request' do it 'sends a request' do
stub1 = stub_request(:post, "https://api.flowdock.com/messages").to_return(status: 200) stub1 = stub_request(:post, "https://api.flowdock.com/messages").to_return(status: 200)