Sha256: 452d89fd6f26c5e891c8390707b2c1647ba98dfb9bb74997a8b473eeb962a7e0

Contents?: true

Size: 859 Bytes

Versions: 12

Compression:

Stored size: 859 Bytes

Contents

require File.join(File.dirname(__FILE__), '/../../test_helper')
require 'mocha'

class CmsDomainSupportTest < ActiveSupport::TestCase

  def setup

  end

  def teardown

  end

  test "cms_site? determines if the first subdomain is 'cms'" do
    c = Cms::ApplicationController.new
    request = mock

    c.expects(:request).returns(request)
    request.expects(:subdomains).returns(["cms"])

    assert c.send :cms_site?
  end

   test "A url that isn't a cms domain" do
    c = Cms::ApplicationController.new
    request = mock

    c.expects(:request).returns(request)
    request.expects(:subdomains).returns(["www"])

    assert_equal false, c.send(:cms_site?)
   end

  test "default cms domain" do
    c = Cms::ApplicationController.new

    assert_equal "cms", c.send(:cms_domain_prefix)
  end

  test "prepare_for_rendererable" do
        
  end
end

Version data entries

12 entries across 12 versions & 5 rubygems

Version Path
browsercms-3.1.5 test/unit/lib/cms_domain_support_test.rb
browsercms-3.1.4 test/unit/lib/cms_domain_support_test.rb
browsercms-3.1.3 test/unit/lib/cms_domain_support_test.rb
bf4-browsercms-3.1.0 test/unit/lib/cms_domain_support_test.rb
drujensen-browsercms-3.2.0 test/unit/lib/cms_domain_support_test.rb
browsercmsi-3.1.2 test/unit/lib/cms_domain_support_test.rb
browsercms-3.1.2 test/unit/lib/cms_domain_support_test.rb
browsercms-3.1.1 test/unit/lib/cms_domain_support_test.rb
browsercmsi-3.1.1 test/unit/lib/cms_domain_support_test.rb
browsercmsi-3.1.0 test/unit/lib/cms_domain_support_test.rb
browsercms-3.1.0 test/unit/lib/cms_domain_support_test.rb
we5-browsercms-3.1.0 test/unit/lib/cms_domain_support_test.rb