From 52c8651a6caf5236ff173555164b676958540b9e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 8 May 2017 12:00:30 +1000 Subject: Fix notify_only_default_branch check for Slack service The notify_only_default_branch property is using boolean_accessor this means we need to check it using a question methods. Also add specs for disabling this option. --- app/models/project_services/chat_notification_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/project_services/chat_notification_service.rb b/app/models/project_services/chat_notification_service.rb index fa782c6fbb7..6464bf3f4a4 100644 --- a/app/models/project_services/chat_notification_service.rb +++ b/app/models/project_services/chat_notification_service.rb @@ -150,7 +150,7 @@ class ChatNotificationService < Service def notify_for_ref?(data) return true if data[:object_attributes][:tag] - return true unless notify_only_default_branch + return true unless notify_only_default_branch? data[:object_attributes][:ref] == project.default_branch end -- cgit v1.2.1