Skip to content
Extraits de code Groupes Projets
Valider 97c1ce54 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

fixed the batch emailer tests... sorry it took me so long

parent 818ccf92
Branches
Étiquettes
Aucune requête de fusion associée trouvée
...@@ -15,14 +15,14 @@ describe RakeHelpers do ...@@ -15,14 +15,14 @@ describe RakeHelpers do
end end
it 'should send emails to each backer' do it 'should send emails to each backer' do
Invitation.should_receive(:create_invitee).exactly(3).times Invitation.should_receive(:create_invitee).exactly(3).times
process_emails(@csv, 100, 1) process_emails(@csv, 100, 1, 10, false)
end end
it 'should not send the email to the same email twice' do it 'should not send the email to the same email twice' do
process_emails(@csv, 100, 1) process_emails(@csv, 100, 1, 10, false)
Devise.mailer.deliveries.count.should == 3 Devise.mailer.deliveries.count.should == 3
process_emails(@csv, 100, 1) process_emails(@csv, 100, 1, 10, false)
Devise.mailer.deliveries.count.should == 3 Devise.mailer.deliveries.count.should == 3
end end
...@@ -30,7 +30,7 @@ describe RakeHelpers do ...@@ -30,7 +30,7 @@ describe RakeHelpers do
it 'should make a user with 10 invites' do it 'should make a user with 10 invites' do
User.count.should == 0 User.count.should == 0
process_emails(@csv, 1, 1) process_emails(@csv, 1, 1, 10, false)
User.count.should == 1 User.count.should == 1
User.first.invites.should == 10 User.first.invites.should == 10
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter