Add resque_spec to test queuing mail.

This commit is contained in:
Robb Kidd 2012-05-21 16:05:12 -04:00
parent 6617eaaf9b
commit 5303cc285a
6 changed files with 13 additions and 2 deletions

View file

@ -88,6 +88,7 @@ describe "Admin::Projects" do
fill_in 'Name', :with => 'NewProject'
fill_in 'Code', :with => 'NPR'
fill_in 'Path', :with => 'gitlabhq_1'
fill_in 'Description', :with => 'New Project Description'
expect { click_button "Save" }.to change { Project.count }.by(1)
@project = Project.last
end

View file

@ -45,7 +45,9 @@ describe "Admin::Users" do
end
it "should send valid email to user with email & password" do
click_button "Save"
with_resque do
click_button "Save"
end
user = User.last
email = ActionMailer::Base.deliveries.last
email.subject.should have_content("Account was created")

View file

@ -133,7 +133,9 @@ describe "Issues" do
end
it "should send valid email to user" do
click_button "Submit new issue"
with_resque do
click_button "Submit new issue"
end
issue = Issue.last
email = ActionMailer::Base.deliveries.last
email.subject.should have_content("New Issue was created")