2012-08-06 03:01:00 +00:00
|
|
|
FactoryGirl.define do
|
2012-08-18 18:48:43 +00:00
|
|
|
factory :user, :class => JamRuby::User do
|
2012-08-06 03:01:00 +00:00
|
|
|
sequence(:email) { |n| "person_#{n}@example.com"}
|
2012-11-21 19:48:39 +00:00
|
|
|
sequence(:first_name) { |n| "Person" }
|
|
|
|
|
sequence(:last_name) { |n| "#{n}" }
|
2012-08-06 03:01:00 +00:00
|
|
|
password "foobar"
|
|
|
|
|
password_confirmation "foobar"
|
2012-11-12 12:28:44 +00:00
|
|
|
email_confirmed true
|
2012-11-21 19:48:39 +00:00
|
|
|
city "Apex"
|
|
|
|
|
state "NC"
|
|
|
|
|
country "USA"
|
2012-11-30 15:23:43 +00:00
|
|
|
musician true
|
2013-03-15 04:22:31 +00:00
|
|
|
terms_of_service true
|
|
|
|
|
|
|
|
|
|
#u.association :musician_instrument, factory: :musician_instrument, user: u
|
|
|
|
|
|
|
|
|
|
before(:create) do |user|
|
|
|
|
|
user.musician_instruments << FactoryGirl.build(:musician_instrument, user: user)
|
|
|
|
|
end
|
2012-08-06 03:01:00 +00:00
|
|
|
|
|
|
|
|
factory :admin do
|
|
|
|
|
admin true
|
|
|
|
|
end
|
|
|
|
|
end
|
2012-08-18 18:48:43 +00:00
|
|
|
|
2012-11-21 19:48:39 +00:00
|
|
|
factory :music_session, :class => JamRuby::MusicSession do
|
2012-10-03 03:50:23 +00:00
|
|
|
sequence(:description) { |n| "Music Session #{n}" }
|
2012-11-16 02:50:03 +00:00
|
|
|
fan_chat true
|
|
|
|
|
fan_access true
|
|
|
|
|
approval_required false
|
|
|
|
|
musician_access true
|
2012-12-09 22:11:01 +00:00
|
|
|
legal_terms true
|
2012-08-18 18:48:43 +00:00
|
|
|
end
|
|
|
|
|
|
2012-10-21 01:55:49 +00:00
|
|
|
factory :connection, :class => JamRuby::Connection do
|
2012-11-02 06:51:52 +00:00
|
|
|
sequence(:client_id) { |n| "Client#{n}" }
|
2012-11-30 15:23:43 +00:00
|
|
|
as_musician true
|
2012-08-18 18:48:43 +00:00
|
|
|
end
|
2012-10-26 10:33:39 +00:00
|
|
|
|
|
|
|
|
factory :invitation, :class => JamRuby::Invitation do
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
factory :friendship, :class => JamRuby::Friendship do
|
|
|
|
|
|
|
|
|
|
end
|
2012-11-12 12:28:44 +00:00
|
|
|
|
2012-12-06 01:56:12 +00:00
|
|
|
factory :band_musician, :class => JamRuby::BandMusician do
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
2012-11-12 12:28:44 +00:00
|
|
|
factory :band, :class => JamRuby::Band do
|
2012-11-21 19:48:39 +00:00
|
|
|
sequence(:name) { |n| "Band" }
|
|
|
|
|
biography "My Biography"
|
|
|
|
|
city "Apex"
|
|
|
|
|
state "NC"
|
|
|
|
|
country "USA"
|
2012-11-12 12:28:44 +00:00
|
|
|
end
|
2012-12-05 19:10:58 +00:00
|
|
|
|
|
|
|
|
factory :genre, :class => JamRuby::Genre do
|
|
|
|
|
description { |n| "Genre #{n}" }
|
|
|
|
|
end
|
2012-11-30 15:23:43 +00:00
|
|
|
|
|
|
|
|
factory :join_request, :class => JamRuby::JoinRequest do
|
|
|
|
|
text 'let me in to the session!'
|
|
|
|
|
end
|
2013-01-15 02:13:45 +00:00
|
|
|
|
|
|
|
|
factory :track, :class => JamRuby::Track do
|
|
|
|
|
sound "mono"
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
2013-01-30 05:46:40 +00:00
|
|
|
factory :recorded_track, :class => JamRuby::RecordedTrack do
|
2013-01-15 02:13:45 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
factory :instrument, :class => JamRuby::Instrument do
|
2013-03-15 04:22:31 +00:00
|
|
|
|
2013-01-15 02:13:45 +00:00
|
|
|
end
|
2013-01-30 05:46:40 +00:00
|
|
|
|
|
|
|
|
factory :recording, :class => JamRuby::Recording do
|
|
|
|
|
|
|
|
|
|
end
|
2013-03-15 04:22:31 +00:00
|
|
|
|
|
|
|
|
factory :musician_instrument, :class => JamRuby::MusicianInstrument do
|
|
|
|
|
instrument { Instrument.find('electric guitar') }
|
|
|
|
|
proficiency_level 1
|
|
|
|
|
priority 0
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
factory :invited_user, :class => JamRuby::InvitedUser do
|
|
|
|
|
sequence(:email) { |n| "user#{n}@someservice.com" }
|
|
|
|
|
autofriend false
|
|
|
|
|
end
|
|
|
|
|
|
2012-12-06 01:56:12 +00:00
|
|
|
end
|