summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRobb Kidd <robb@thekidds.org>2012-05-21 16:05:12 -0400
committerRobb Kidd <robb@thekidds.org>2012-06-20 14:09:46 -0400
commit5303cc285a2067b59f1e8b68f707e8dbf90fe59e (patch)
tree6ca78aa79612f3f6913ce3060e575c37001c5327 /spec
parent6617eaaf9b9ff5a76cb2c4150623a685357966d4 (diff)
downloadgitlab-ce-5303cc285a2067b59f1e8b68f707e8dbf90fe59e.tar.gz
Add resque_spec to test queuing mail.
Diffstat (limited to 'spec')
-rw-r--r--spec/requests/admin/admin_projects_spec.rb1
-rw-r--r--spec/requests/admin/admin_users_spec.rb4
-rw-r--r--spec/requests/issues_spec.rb4
3 files changed, 7 insertions, 2 deletions
diff --git a/spec/requests/admin/admin_projects_spec.rb b/spec/requests/admin/admin_projects_spec.rb
index 9a33c6936a7..fb6577de326 100644
--- a/spec/requests/admin/admin_projects_spec.rb
+++ b/spec/requests/admin/admin_projects_spec.rb
@@ -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
diff --git a/spec/requests/admin/admin_users_spec.rb b/spec/requests/admin/admin_users_spec.rb
index 91082a644b5..c98ed2cf6db 100644
--- a/spec/requests/admin/admin_users_spec.rb
+++ b/spec/requests/admin/admin_users_spec.rb
@@ -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")
diff --git a/spec/requests/issues_spec.rb b/spec/requests/issues_spec.rb
index 5c59675b459..aa43b997f8a 100644
--- a/spec/requests/issues_spec.rb
+++ b/spec/requests/issues_spec.rb
@@ -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")