Mercurial > hg > soundsoftware-site
annotate vendor/plugins/engines/test/functional/exception_notification_compatibility_test.rb @ 929:5f33065ddc4b redmine-1.3
Update to Redmine SVN rev 9414 on 1.3-stable branch
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 14:54:18 +0100 |
parents | 513646585e45 |
children |
rev | line source |
---|---|
Chris@0 | 1 require File.dirname(__FILE__) + '/../test_helper' |
Chris@0 | 2 |
Chris@0 | 3 class ExceptionNotificationCompatibilityTest < ActionController::TestCase |
Chris@0 | 4 ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bill@schmoe.com) |
Chris@0 | 5 class SimpleController < ApplicationController |
Chris@0 | 6 include ExceptionNotifiable |
Chris@0 | 7 local_addresses.clear |
Chris@0 | 8 consider_all_requests_local = false |
Chris@0 | 9 def index |
Chris@0 | 10 begin |
Chris@0 | 11 raise "Fail!" |
Chris@0 | 12 rescue Exception => e |
Chris@0 | 13 rescue_action_in_public(e) |
Chris@0 | 14 end |
Chris@0 | 15 end |
Chris@0 | 16 end |
Chris@0 | 17 |
Chris@0 | 18 def setup |
Chris@0 | 19 @controller = SimpleController.new |
Chris@0 | 20 @request = ActionController::TestRequest.new |
Chris@0 | 21 @response = ActionController::TestResponse.new |
Chris@0 | 22 end |
Chris@0 | 23 |
Chris@0 | 24 def test_should_work |
Chris@0 | 25 assert_nothing_raised do |
Chris@0 | 26 get :index |
Chris@0 | 27 end |
Chris@0 | 28 end |
Chris@0 | 29 end |