Commit 83716d8a051ce2f273c924ba504d293b38f38525

Authored by Antonio Terceiro
1 parent b759d641

Remove integration test for exception_notification

It was breaking the integration tests (messing with internals of an old
version of exception_notification), and the tests are testing that
exception_notification actually works which is _not_ a job for the
Noosfero test suite.
Showing 1 changed file with 0 additions and 37 deletions   Show diff stats
test/integration/exception_notification_test.rb
@@ -1,37 +0,0 @@ @@ -1,37 +0,0 @@
1 -require File.dirname(__FILE__) + '/../test_helper'  
2 -require 'account_controller'  
3 -begin  
4 - require 'exception_notification.rb'  
5 - ActionController::Base.send :include, ExceptionNotifiable  
6 - ExceptionNotifier.exception_recipients = ['admin@example.com', 'user@example.com']  
7 -  
8 - class ExceptionNotificationTest < ActionController::IntegrationTest  
9 - def setup  
10 - ActionMailer::Base.delivery_method = :test  
11 - ActionMailer::Base.perform_deliveries = true  
12 - ActionMailer::Base.deliveries = []  
13 - [ProfileController, AccountController].each{|klass| klass.any_instance.stubs(:signup).raises(RuntimeError)}  
14 - [ProfileController, AccountController].each{|klass| klass.any_instance.stubs(:local_request?).returns(false)}  
15 - [ProfileController, AccountController].each{|klass| klass.any_instance.stubs(:consider_all_requests_local).returns(false)}  
16 - end  
17 -  
18 - should 'deliver mail notification about exceptions' do  
19 - assert_difference 'ActionMailer::Base.deliveries.size' do  
20 - get '/account/signup'  
21 - end  
22 - end  
23 -  
24 - should 'deliver mails to addresses listed in Noosfero configuration noosfero.yml' do  
25 - get '/account/signup'  
26 - assert_includes ActionMailer::Base.deliveries.map(&:to).flatten, 'admin@example.com'  
27 - assert_includes ActionMailer::Base.deliveries.map(&:to).flatten, 'user@example.com'  
28 - end  
29 -  
30 - should 'render not found when try to access invalid url' do  
31 - get '/profile/ze/tag/notexists'  
32 - assert_template 'not_found'  
33 - end  
34 - end  
35 -rescue LoadError  
36 - puts 'W: skipping exception_notification integration tests since exception_notification is not installed'  
37 -end