require 'usman/factories.rb' FactoryGirl.define do factory :unpublished_branch, class: Dhatu::Branch do title "Some Title" address_1 "Address 1" address_2 "Address 2" address_3 "Address 3" email landline "0495123456" fax "0495987654" mobile "9880123456" facebook "http://www.facebook.com/account_name" twitter "http://www.twitter.com/account_name" google_plus "http://www.google.com/account_name" linked_in "http://www.linked.com/account_name" youtube "http://www.youtube.com/account_name" instagram "http://www.instagram.com/account_name" tumblr "http://www.tumblr.com/account_name" pinterest "http://www.pinterest.com/account_name" blog "http://www.blogger.com/account_name" status "unpublished" end factory :published_branch, parent: :unpublished_branch do after :build do |e| e.publish end end factory :removed_branch, parent: :unpublished_branch do after :build do |e| e.remove end end factory :archived_branch, parent: :unpublished_branch do after :build do |e| e.archive end end factory :featured_branch, parent: :published_branch do after :build do |e| e.mark_as_featured end end factory :non_featured_contact_info, parent: :published_contact_info do after :build do |e| e.remove_from_featured end end end