Fix factories
This commit is contained in:
parent
0f9e39b7be
commit
790808f412
1 changed files with 0 additions and 7 deletions
|
|
@ -7,7 +7,6 @@ FactoryGirl.define do
|
|||
diaspora_id
|
||||
url "http://somehost:3000/"
|
||||
serialized_public_key { generate(:public_key) }
|
||||
after(:create, &:save)
|
||||
end
|
||||
|
||||
factory :user, class: Person do
|
||||
|
|
@ -18,36 +17,30 @@ FactoryGirl.define do
|
|||
user.serialized_private_key = private_key.export
|
||||
user.serialized_public_key = private_key.public_key.export
|
||||
end
|
||||
after(:create, &:save)
|
||||
end
|
||||
|
||||
factory :post, class: Entity do
|
||||
entity_type "Post"
|
||||
author { FactoryGirl.build(:person) }
|
||||
after(:create, &:save)
|
||||
end
|
||||
|
||||
factory :comment, class: Entity do
|
||||
entity_type "Comment"
|
||||
author { FactoryGirl.build(:person) }
|
||||
after(:create, &:save)
|
||||
end
|
||||
|
||||
factory :poll, class: Entity do
|
||||
entity_type "Poll"
|
||||
author { FactoryGirl.build(:person) }
|
||||
after(:create, &:save)
|
||||
end
|
||||
|
||||
factory :event, class: Entity do
|
||||
entity_type "Event"
|
||||
author { FactoryGirl.build(:person) }
|
||||
after(:create, &:save)
|
||||
end
|
||||
|
||||
factory :conversation, class: Entity do
|
||||
entity_type "Conversation"
|
||||
author { FactoryGirl.build(:person) }
|
||||
after(:create, &:save)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue