Project

General

Profile

« Previous | Next » 

Revision f329b160

Added by Dominic Cleal about 8 years ago

refs #9470 - set :limit on column, fix MailNotification initializer

MailNotification.new failed unless it had a Hash argument, hence the
factory had been changed from default behaviour. It also then ignored
all attributes except a given few listed in initialize_with.

View differences:

test/factories/mail_notification.rb
FactoryGirl.define do
factory :mail_notification do
ignore do
sequence(:name) {|n| "notification#{n}"}
default_interval "Daily"
mailer "HostMailer"
mailer_method "test_mail"
description "Notifies a user"
subscription_type "report"
queryable false
end
sequence(:name) {|n| "notification#{n}"}
default_interval "Daily"
mailer "HostMailer"
mailer_method "test_mail"
description "Notifies a user"
subscription_type "report"
queryable false
trait :puppet_error do
sequence(:name) {"puppet_error_state"}
mailer "HostMailer"
mailer_method "puppet"
type "PuppetError"
end
initialize_with { MailNotification.new ({:name => name, :mailer => mailer, :mailer_method => mailer_method} ) }
end
end

Also available in: Unified diff