fix account deletion specs

This commit is contained in:
danielgrippi 2011-12-09 17:51:29 -08:00
parent af7962e2e8
commit fb39a1e16d
2 changed files with 3 additions and 5 deletions

View file

@ -13,7 +13,7 @@ class AccountDeletion < ActiveRecord::Base
attr_accessible :person
xml_name :account_deletion
xml_attr :diaspora_handle
xml_attr :diaspora_handle
def person=(person)
self[:diaspora_handle] = person.diaspora_handle
@ -25,12 +25,10 @@ class AccountDeletion < ActiveRecord::Base
self[:person_id] ||= Person.find_by_diaspora_handle(diaspora_handle).id
end
def queue_delete_account
Resque.enqueue(Jobs::DeleteAccount, self.id)
end
def perform!
self.dispatch if person.local?
AccountDeleter.new(self.diaspora_handle).perform!

View file

@ -199,7 +199,7 @@ describe UsersController do
end
it 'enqueues a delete job' do
Resque.should_receive(:enqueue).with(Jobs::DeleteAccount, alice.id)
Resque.should_receive(:enqueue).with(Jobs::DeleteAccount, anything)
delete :destroy, :user => { :current_password => "bluepin7" }
end