From 2d89e595211ce438917678d1e5d55d1573a39d11 Mon Sep 17 00:00:00 2001 From: Raffael Schmid Date: Mon, 28 Jan 2013 23:34:44 +0100 Subject: [PATCH] add problem url into the chat message --- app/models/notification_services/hubot_service.rb | 2 +- spec/models/notification_service/hubot_service_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/notification_services/hubot_service.rb b/app/models/notification_services/hubot_service.rb index 9a56981..379cbae 100644 --- a/app/models/notification_services/hubot_service.rb +++ b/app/models/notification_services/hubot_service.rb @@ -22,7 +22,7 @@ class NotificationServices::HubotService < NotificationService end def message_for_hubot(problem) - notification_description(problem) + "#{notification_description(problem)} #{problem_url(problem)}" end def create_notification(problem) diff --git a/spec/models/notification_service/hubot_service_spec.rb b/spec/models/notification_service/hubot_service_spec.rb index f3cddd5..07e16c2 100644 --- a/spec/models/notification_service/hubot_service_spec.rb +++ b/spec/models/notification_service/hubot_service_spec.rb @@ -8,7 +8,7 @@ describe NotificationService::HubotService do problem = notice.problem # faraday stubbing - HTTParty.should_receive(:post).with(notification_service.api_token, :body => {:message => '[production][foo#bar] FooError: Too Much Bar', :room => notification_service.room_id}).and_return(true) + HTTParty.should_receive(:post).with(notification_service.api_token, :body => {:message => an_instance_of(String), :room => notification_service.room_id}).and_return(true) notification_service.create_notification(problem) end -- libgit2 0.21.2