Merge branch 'develop' into api
This commit is contained in:
commit
07acfba488
1 changed files with 9 additions and 7 deletions
|
|
@ -109,14 +109,16 @@ end
|
||||||
|
|
||||||
shared_examples_for "migration scenarios initiated remotely" do
|
shared_examples_for "migration scenarios initiated remotely" do
|
||||||
it "resends known contacts to the new user" do
|
it "resends known contacts to the new user" do
|
||||||
contacts = Array.new(2) { FactoryGirl.create(:contact, person: old_user.person, sharing: true) }
|
2.times do
|
||||||
expect(DiasporaFederation::Federation::Sender).to receive(:private)
|
contact = FactoryGirl.create(:contact, person: old_user.person, sharing: true)
|
||||||
.twice do |sender_id, obj_str, _urls, _xml|
|
expect(DiasporaFederation::Federation::Sender).to receive(:private)
|
||||||
expect(sender_id).to eq(contacts.first.user_id)
|
.with(
|
||||||
expect(obj_str).to eq("Contact:#{contacts.first.user.diaspora_handle}:#{new_user.diaspora_handle}")
|
contact.user_id,
|
||||||
contacts.shift
|
"Contact:#{contact.user.diaspora_handle}:#{new_user.diaspora_handle}",
|
||||||
[]
|
kind_of(Hash)
|
||||||
|
).and_return([])
|
||||||
end
|
end
|
||||||
|
|
||||||
inlined_jobs { run_migration }
|
inlined_jobs { run_migration }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue