Commit 5303cc285a2067b59f1e8b68f707e8dbf90fe59e
1 parent
6617eaaf
Exists in
master
and in
4 other branches
Add resque_spec to test queuing mail.
Showing
6 changed files
with
13 additions
and
2 deletions
Show diff stats
Gemfile
Gemfile.lock
... | ... | @@ -263,6 +263,9 @@ GEM |
263 | 263 | resque_mailer (2.0.3) |
264 | 264 | actionmailer (>= 3.0.0) |
265 | 265 | resque (>= 1.2.3) |
266 | + resque_spec (0.11.0) | |
267 | + resque (>= 1.19.0) | |
268 | + rspec (>= 2.5.0) | |
266 | 269 | rspec (2.10.0) |
267 | 270 | rspec-core (~> 2.10.0) |
268 | 271 | rspec-expectations (~> 2.10.0) |
... | ... | @@ -391,6 +394,7 @@ DEPENDENCIES |
391 | 394 | redcarpet (~> 2.1.1) |
392 | 395 | resque (~> 1.20.0) |
393 | 396 | resque_mailer |
397 | + resque_spec | |
394 | 398 | rspec-rails |
395 | 399 | sass-rails (= 3.2.5) |
396 | 400 | seed-fu | ... | ... |
... | ... | @@ -0,0 +1 @@ |
1 | +Resque::Mailer.excluded_environments = [] | ... | ... |
spec/requests/admin/admin_projects_spec.rb
... | ... | @@ -88,6 +88,7 @@ describe "Admin::Projects" do |
88 | 88 | fill_in 'Name', :with => 'NewProject' |
89 | 89 | fill_in 'Code', :with => 'NPR' |
90 | 90 | fill_in 'Path', :with => 'gitlabhq_1' |
91 | + fill_in 'Description', :with => 'New Project Description' | |
91 | 92 | expect { click_button "Save" }.to change { Project.count }.by(1) |
92 | 93 | @project = Project.last |
93 | 94 | end | ... | ... |
spec/requests/admin/admin_users_spec.rb
... | ... | @@ -45,7 +45,9 @@ describe "Admin::Users" do |
45 | 45 | end |
46 | 46 | |
47 | 47 | it "should send valid email to user with email & password" do |
48 | - click_button "Save" | |
48 | + with_resque do | |
49 | + click_button "Save" | |
50 | + end | |
49 | 51 | user = User.last |
50 | 52 | email = ActionMailer::Base.deliveries.last |
51 | 53 | email.subject.should have_content("Account was created") | ... | ... |
spec/requests/issues_spec.rb
... | ... | @@ -133,7 +133,9 @@ describe "Issues" do |
133 | 133 | end |
134 | 134 | |
135 | 135 | it "should send valid email to user" do |
136 | - click_button "Submit new issue" | |
136 | + with_resque do | |
137 | + click_button "Submit new issue" | |
138 | + end | |
137 | 139 | issue = Issue.last |
138 | 140 | email = ActionMailer::Base.deliveries.last |
139 | 141 | email.subject.should have_content("New Issue was created") | ... | ... |