Adds missing fill_in_admin_notification_form in common actions

This commit is contained in:
decabeza
2018-07-25 19:13:31 +02:00
parent bbf3faa783
commit 8b6a8703e0

View File

@@ -53,4 +53,11 @@ module Notifications
field_check_message = 'Please check the marked fields to know how to correct them:'
/\d errors? prevented this #{resource_model} from being saved. #{field_check_message}/
end
def fill_in_admin_notification_form(options = {})
select (options[:segment_recipient] || 'All users'), from: :admin_notification_segment_recipient
fill_in :admin_notification_title, with: (options[:title] || 'This is the notification title')
fill_in :admin_notification_body, with: (options[:body] || 'This is the notification body')
fill_in :admin_notification_link, with: (options[:link] || 'https://www.decide.madrid.es/vota')
end
end