Sha256: 694ac27ce1dce6a0c419391d8da202ecaf25c408deb86da7ed372d297d257337

Contents?: true

Size: 787 Bytes

Versions: 15

Compression:

Stored size: 787 Bytes

Contents

require 'test_helper'

class ThemeTest < ActiveSupport::TestCase

  context "theme" do
    setup do
      @theme = Theme.first || Theme.create
      @theme.name = 'blue'
      @blue_theme_hash = {:name=>"blue", :description=>"Put information about your theme here", :preview_image=>"/images/blue/preview.gif"}
    end
    context "locales" do
      should "get the locales for the current theme" do
        assert @theme.locales.any? {|locale| locale.index('blue') > 0}, "locales for the blue theme did not contain blue.yml"
      end
    end
    context "available themes" do
      should "find 2 themes" do
        current_theme, themes = Theme.available_themes(@theme)
        assert themes.length == 2
        assert_equal current_theme, @blue_theme_hash
      end
    end
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
disguise-2.0.0 test/rails_root/test/unit/theme_test.rb
disguise-0.4.0 test/rails_root/test/unit/theme_test.rb
disguise-0.3.12 test/rails_root/test/unit/theme_test.rb
disguise-0.3.11 test/rails_root/test/unit/theme_test.rb
disguise-0.3.10 test/rails_root/test/unit/theme_test.rb
disguise-0.3.8 test/rails_root/test/unit/theme_test.rb
disguise-0.3.7 test/rails_root/test/unit/theme_test.rb
disguise-0.3.6 test/rails_root/test/unit/theme_test.rb
disguise-0.3.1 test/rails_root/test/unit/theme_test.rb
disguise-0.3.2 test/rails_root/test/unit/theme_test.rb
disguise-0.3.3 test/rails_root/test/unit/theme_test.rb
disguise-0.3.4 test/rails_root/test/unit/theme_test.rb
disguise-0.3.5 test/rails_root/test/unit/theme_test.rb
disguise-0.2.0 test/rails_root/test/unit/theme_test.rb
disguise-0.3.0 test/rails_root/test/unit/theme_test.rb