Commit 2d89e595211ce438917678d1e5d55d1573a39d11
1 parent
c6a9f4a5
Exists in
master
and in
1 other branch
add problem url into the chat message
Showing
2 changed files
with
2 additions
and
2 deletions
Show diff stats
app/models/notification_services/hubot_service.rb
... | ... | @@ -22,7 +22,7 @@ class NotificationServices::HubotService < NotificationService |
22 | 22 | end |
23 | 23 | |
24 | 24 | def message_for_hubot(problem) |
25 | - notification_description(problem) | |
25 | + "#{notification_description(problem)} #{problem_url(problem)}" | |
26 | 26 | end |
27 | 27 | |
28 | 28 | def create_notification(problem) | ... | ... |
spec/models/notification_service/hubot_service_spec.rb
... | ... | @@ -8,7 +8,7 @@ describe NotificationService::HubotService do |
8 | 8 | problem = notice.problem |
9 | 9 | |
10 | 10 | # faraday stubbing |
11 | - 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) | |
11 | + HTTParty.should_receive(:post).with(notification_service.api_token, :body => {:message => an_instance_of(String), :room => notification_service.room_id}).and_return(true) | |
12 | 12 | |
13 | 13 | notification_service.create_notification(problem) |
14 | 14 | end | ... | ... |