diaspora/spec/integration/account_deletion_spec.rb
cmrd Senya 45619cb153
Account migration model and message support
This commit introduces support for AccountMigration federation message
receive. It covers the cases when the new home pod for a user is remote
respective to the recepient pod of the message. It also allows to initiate
migration locally by a podmin from the rails console. This will give the
pods a possibility to understand the account migration event on the
federation level and thus future version which will implement migration
will be backward compatible with the pods starting from this commit.
2017-08-15 01:32:34 +03:00

39 lines
931 B
Ruby

describe "deleteing account", type: :request do
def account_removal_method
AccountDeleter.new(person).perform!
subject.reload
end
context "of local user" do
subject(:user) { FactoryGirl.create(:user_with_aspect) }
let(:person) { user.person }
before do
DataGenerator.create(subject, :generic_user_data)
end
it_behaves_like "deletes all of the user data"
it_behaves_like "it removes the person associations"
it_behaves_like "it keeps the person conversations"
end
context "of remote person" do
subject(:person) { remote_raphael }
before do
DataGenerator.create(subject, :generic_person_data)
end
it_behaves_like "it removes the person associations"
it_behaves_like "it keeps the person conversations"
it_behaves_like "it makes account closed and clears profile" do
before do
account_removal_method
end
end
end
end