Created
June 26, 2016 17:03
-
-
Save mfilipe/c8200a8ed4b96ed45e2146269e55edff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FactoryGirl.define do | |
factory :flow do | |
name "MyString" | |
daily_send nil | |
send_on_weekends false | |
actions [{'when': 'now', 'order': '1', 'template_id': '1234'}] | |
recipients [{'contact_id': '1234'}, | |
{'first_name': 'Test', 'last_name': 'Last','email': 'user@test.com', 'business': 'Testing'}] | |
company | |
user { build :user, company: company } | |
end | |
factory :flow_manual_recipient, parent: :flow do | |
recipients [{'first_name': 'Test', 'last_name': 'Last', 'email': 'user@test.com', 'business': 'Testing'}] | |
end | |
factory :flow_base_recipient, parent: :flow do | |
recipients [{'contact_id': create(:contact, company: company).id }, | |
{'contact_id': create(:contact, company: company).id }] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment