Created
June 14, 2011 17:11
-
-
Save mattrw89/1025363 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
factory :person_with_things, :parent => :person do | |
after_create do |f| | |
Factory(:friend, :person => f) | |
Factory(:friend, :person => f) | |
Factory(:friend, :person => f) | |
Factory(:education_history_highschool, :person => f) | |
Factory(:education_history_college, :person => f) | |
Factory(:education_history_gradschool, :person => f) | |
Factory(:interest, :person => f) | |
Factory(:interest_2, :person => f) | |
Factory(:location, :person => f) | |
Factory.build(:organization, :person => f) #NEW | |
Factory(:organization_membership, :person => f) #NEW | |
end | |
end | |
factory :organization_membership do #NEW | |
before_create do |o| #NEW | |
o.association :organization #NEW | |
o.association :person_with_things #NEW | |
end #NEW | |
after_create do |i| #NEW | |
i.leader 1 #NEW | |
end #NEW | |
end #NEW | |
factory :user_with_auxs, :parent => :user do | |
after_create do |a| | |
Factory(:person_with_things, :user => a) | |
Factory(:authentication, :user => a) | |
end | |
end | |
factory :access_token, :class => Rack::OAuth2::Server::AccessToken do | |
code "9d68af577f8a4c9076752c9699d2ac2ace64f9dcb407897f754439096cedbfca" | |
scope "userinfo contacts" | |
end | |
factory :organization do | |
name {"Organization #{Factory.create(:count)}"} | |
terminology 'Organization' | |
end | |
factory :authentication do | |
provider "facebook" | |
uid "690860831" | |
token "164949660195249|bd3f24d52b4baf9412141538.1-690860831|w79R36CalrEAY-9e9kp8fDWJ69A" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment