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
|
diaspora_id
|
||||||
url "http://somehost:3000/"
|
url "http://somehost:3000/"
|
||||||
serialized_public_key { generate(:public_key) }
|
serialized_public_key { generate(:public_key) }
|
||||||
after(:create, &:save)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :user, class: Person do
|
factory :user, class: Person do
|
||||||
|
|
@ -18,36 +17,30 @@ FactoryGirl.define do
|
||||||
user.serialized_private_key = private_key.export
|
user.serialized_private_key = private_key.export
|
||||||
user.serialized_public_key = private_key.public_key.export
|
user.serialized_public_key = private_key.public_key.export
|
||||||
end
|
end
|
||||||
after(:create, &:save)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :post, class: Entity do
|
factory :post, class: Entity do
|
||||||
entity_type "Post"
|
entity_type "Post"
|
||||||
author { FactoryGirl.build(:person) }
|
author { FactoryGirl.build(:person) }
|
||||||
after(:create, &:save)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :comment, class: Entity do
|
factory :comment, class: Entity do
|
||||||
entity_type "Comment"
|
entity_type "Comment"
|
||||||
author { FactoryGirl.build(:person) }
|
author { FactoryGirl.build(:person) }
|
||||||
after(:create, &:save)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :poll, class: Entity do
|
factory :poll, class: Entity do
|
||||||
entity_type "Poll"
|
entity_type "Poll"
|
||||||
author { FactoryGirl.build(:person) }
|
author { FactoryGirl.build(:person) }
|
||||||
after(:create, &:save)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :event, class: Entity do
|
factory :event, class: Entity do
|
||||||
entity_type "Event"
|
entity_type "Event"
|
||||||
author { FactoryGirl.build(:person) }
|
author { FactoryGirl.build(:person) }
|
||||||
after(:create, &:save)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
factory :conversation, class: Entity do
|
factory :conversation, class: Entity do
|
||||||
entity_type "Conversation"
|
entity_type "Conversation"
|
||||||
author { FactoryGirl.build(:person) }
|
author { FactoryGirl.build(:person) }
|
||||||
after(:create, &:save)
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue