Sha256: 51815834fa28c686064924171569159eac01b24472ee9b771876f2dd7942bb7b

Contents?: true

Size: 1.31 KB

Versions: 22

Compression:

Stored size: 1.31 KB

Contents

require File.dirname(__FILE__) + '/test_helper'

class ExceptionNotifiableTest < Test::Unit::TestCase

  def setup
    @controller = BasicController.new
  end

  #Tests for the default values when ExceptionNotifiable is included in a controller
  def test_default_http_status_codes
    assert(BasicController.http_status_codes == HTTP_STATUS_CODES, "Default http_status_codes is incorrect")
  end

  def test_default_error_layout
    assert(BasicController.error_layout == nil, "Default error_layout is incorrect")
  end

  def test_default_error_class_status_codes
    assert(BasicController.error_class_status_codes == BasicController.codes_for_error_classes, "Default error_class_status_codes is incorrect")
  end

  def test_default_exception_notifiable_verbose
    assert(BasicController.exception_notifiable_verbose == false, "Default exception_notifiable_verbose is incorrect")
  end

  def test_default_exception_notifiable_silent_exceptions
    assert(BasicController.exception_notifiable_silent_exceptions == SILENT_EXCEPTIONS, "Default exception_notifiable_silent_exceptions is incorrect")
  end

  def test_default_exception_notifiable_notification_level
    assert(BasicController.exception_notifiable_notification_level == [:render, :email, :web_hooks], "Default exception_notifiable_notification_level is incorrect")
  end

end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
super_exception_notifier-3.0.13 test/exception_notifiable_test.rb
super_exception_notifier-3.0.12 test/exception_notifiable_test.rb
super_exception_notifier-3.0.11 test/exception_notifiable_test.rb
super_exception_notifier-3.0.10 test/exception_notifiable_test.rb
super_exception_notifier-3.0.9 test/exception_notifiable_test.rb
super_exception_notifier-3.0.8 test/exception_notifiable_test.rb
super_exception_notifier-3.0.7 test/exception_notifiable_test.rb
super_exception_notifier-3.0.6 test/exception_notifiable_test.rb
super_exception_notifier-3.0.5 test/exception_notifiable_test.rb
super_exception_notifier-3.0.4 test/exception_notifiable_test.rb
super_exception_notifier-3.0.2 test/exception_notifiable_test.rb
super_exception_notifier-3.0.1 test/exception_notifiable_test.rb
super_exception_notifier-2.0.8 test/exception_notifiable_test.rb
super_exception_notifier-2.0.7 test/exception_notifiable_test.rb
super_exception_notifier-2.0.6 test/exception_notifiable_test.rb
super_exception_notifier-2.0.5 test/exception_notifiable_test.rb
bmpercy-exception_notification-2.0.5 test/exception_notifiable_test.rb
super_exception_notifier-2.0.4 test/exception_notifiable_test.rb
super_exception_notifier-2.0.3 test/exception_notifiable_test.rb
super_exception_notifier-2.0.2 test/exception_notifiable_test.rb