Skip to content
Extraits de code Groupes Projets
Valider 78c30b84 rédigé par zhitomirskiyi's avatar zhitomirskiyi
Parcourir les fichiers

added files

parent b49f5414
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
module Job
class ResendInvitation < Base
@queue = :mail
def self.perform_delegate(invitation_id)
inv = Invitation.where(:id => invitation_id).first
inv.resend
end
end
end
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3 or later. See
# the COPYRIGHT file.
require 'spec_helper'
describe Job::ResendInvitation do
describe '#perfom_delegate' do
it 'should call .resend on the object' do
user = alice
aspect = user.aspects.create(:name => "cats")
user.invite_user("b@b.com", aspect.id)
invitation = user.reload.invitations_from_me.first
#Notification.should_receive(:notify).with(instance_of(User), instance_of(StatusMessage), instance_of(Person))
Invitation.stub(:where).with(:id => invitation.id ).and_return(invitation)
invitation.should_receive(:resend)
Job::ResendInvitation.perform_delegate(invitation)
end
end
end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter