Sha256: 584a646e0f7db8733b26e56d67547f55fcbd23b08849d503b7f69f22482a29ac

Contents?: true

Size: 1.12 KB

Versions: 18

Compression:

Stored size: 1.12 KB

Contents

require "test_helper"

class ContentRenderingSupportTest < ActiveSupport::TestCase

  def setup

  end

  def teardown

  end

  test "still has error handling methods" do
    c = Cms::ContentController.new
    
    assert c.respond_to? :handle_access_denied_on_page
    assert c.respond_to? :handle_not_found_on_page
    assert c.respond_to? :handle_server_error_on_page
    assert c.respond_to? :handle_error_with_cms_page, true

    assert(c.respond_to?(:logged_in?), "Should include Cms::Authentication::Controller methods")
  end

  class MyController < ActionController::Base
    include Cms::ContentRenderingSupport
  end

  test "Arbitrary controller should have authentication methods" do
    c = MyController.new

    assert c.respond_to? :handle_access_denied_on_page
    assert c.respond_to? :handle_not_found_on_page
    assert c.respond_to? :handle_server_error_on_page
    assert c.respond_to? :handle_error_with_cms_page, true

    assert(!c.respond_to?(:logged_in?), "Should Not include Cms::Authentication::Controller methods")
    assert(c.respond_to?(:handle_server_error), "Should include Cms::ErrorHandling methods")
  end

end

Version data entries

18 entries across 18 versions & 5 rubygems

Version Path
browsercms-3.4.2 test/unit/lib/content_rendering_support_test.rb
browsercms-3.4.2.rc1 test/unit/lib/content_rendering_support_test.rb
browsercms-3.4.1 test/unit/lib/content_rendering_support_test.rb
browsercms-3.4.0 test/unit/lib/content_rendering_support_test.rb
browsercms-3.4.0.rc2 test/unit/lib/content_rendering_support_test.rb
browsercms-3.4.0.rc1 test/unit/lib/content_rendering_support_test.rb
browsercms-3.1.5 test/unit/lib/content_rendering_support_test.rb
browsercms-3.1.4 test/unit/lib/content_rendering_support_test.rb
browsercms-3.1.3 test/unit/lib/content_rendering_support_test.rb
bf4-browsercms-3.1.0 test/unit/lib/content_rendering_support_test.rb
drujensen-browsercms-3.2.0 test/unit/lib/content_rendering_support_test.rb
browsercmsi-3.1.2 test/unit/lib/content_rendering_support_test.rb
browsercms-3.1.2 test/unit/lib/content_rendering_support_test.rb
browsercms-3.1.1 test/unit/lib/content_rendering_support_test.rb
browsercmsi-3.1.1 test/unit/lib/content_rendering_support_test.rb
browsercmsi-3.1.0 test/unit/lib/content_rendering_support_test.rb
browsercms-3.1.0 test/unit/lib/content_rendering_support_test.rb
we5-browsercms-3.1.0 test/unit/lib/content_rendering_support_test.rb