factories for synapse, topic, user
This commit is contained in:
parent
e3a4207827
commit
310222aef9
3 changed files with 24 additions and 0 deletions
9
spec/factories/synapses.rb
Normal file
9
spec/factories/synapses.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
FactoryGirl.define do
|
||||
factory :synapse do
|
||||
desc { random_string(10) }
|
||||
category :to
|
||||
permission :commons
|
||||
association :node1, factory: :topic
|
||||
association :node2, factory: :topic
|
||||
end
|
||||
end
|
6
spec/factories/topics.rb
Normal file
6
spec/factories/topics.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
FactoryGirl.define do
|
||||
factory :topic do
|
||||
name { random_string(10) }
|
||||
permission :commons
|
||||
end
|
||||
end
|
9
spec/factories/users.rb
Normal file
9
spec/factories/users.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
FactoryGirl.define do
|
||||
factory :user do
|
||||
name { random_string(10) }
|
||||
email { random_string(10) + '@' + random_string(10) + '.com' }
|
||||
code { random_string(8) }
|
||||
joinedwithcode { random_string(8) }
|
||||
password 'omgwtfbbq'
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue