Skip to content

Commit

Permalink
define federation entity factories
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperTux88 authored and denschub committed Dec 30, 2015
1 parent 082e300 commit 0e7bb6d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions spec/factories.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def r_str
SecureRandom.hex(3)
end

require "diaspora_federation/test"
DiasporaFederation::Test::Factories.federation_factories

FactoryGirl.define do
factory :profile do
sequence(:first_name) { |n| "Robert#{n}#{r_str}" }
Expand Down
4 changes: 2 additions & 2 deletions spec/support/fixture_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

local_leia.contacts.create(:person => remote_raphael, :aspects => [leias_aspect])
local_luke.contacts.create(:person => remote_raphael, :aspects => [lukes_aspect])

# Set up a follower
peter = FactoryGirl.create(:user_with_aspect, :username => "peter")
peters_aspect = peter.aspects.where(:name => "generic").first

peter.contacts.create!(:person => alice.person,
:aspects => [peters_aspect],
:sharing => false,
Expand Down

0 comments on commit 0e7bb6d

Please sign in to comment.