Sha256: 7c4b7a2f651fbf1dd931fc783342a33320992a0f82814f1e911c399cef2b75f5

Contents?: true

Size: 1.39 KB

Versions: 2

Compression:

Stored size: 1.39 KB

Contents

# encoding: utf-8

require File.expand_path('../test_helper', File.dirname(__FILE__))

class ConfigurationTest < ActiveSupport::TestCase
  
  def test_configuration_presence
    assert config = ComfyPress.configuration
    assert_equal 'ComfyPress CMS Engine', config.cms_title
    assert_equal 'ComfyPress::HttpAuth', config.admin_auth
    assert_equal 'ComfyPress::DummyAuth', config.public_auth
    assert_equal '', config.admin_route_redirect
    assert_equal false, config.enable_fixtures
    assert_equal File.expand_path('db/cms_fixtures', Rails.root), config.fixtures_path
    assert_equal 25, config.revisions_limit
    assert_equal ({ 
      'en'    => 'English',
      'es'    => 'Español',
      'pt-BR' => 'Português Brasileiro',
      'zh-CN' => '简体中文',
      'ja'    => '日本語'
    }), config.locales
    assert_equal nil, config.admin_locale
    assert_equal nil, config.database_config
    assert_equal ({}), config.upload_file_options
    assert_equal nil, config.admin_cache_sweeper
    assert_equal false, config.allow_irb
    assert_equal nil, config.allowed_helpers
    assert_equal nil, config.allowed_partials
    assert_equal nil, config.hostname_aliases
  end
  
  def test_initialization_overrides
    ComfyPress.configuration.cms_title = 'New Title'
    assert_equal 'New Title', ComfyPress.configuration.cms_title
  end
  
  def test_version
    assert ComfyPress::VERSION
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comfypress-0.1.4 test/unit/configuration_test.rb
comfypress-0.1.3 test/unit/configuration_test.rb