Adds missing fill_in_admin_notification_form in common actions
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user