Sha256: a789a7cee9d3e5eb5ef22ec19afaa976580eb6b217c17929c2c32fa720f428e7
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
require File.dirname(__FILE__) + '/../../../../../test/test_helper' class FsSkinViewTest < Zena::View::TestCase context 'A page using a fs_skin Skin' do setup do login(:lion) skin = secure(Skin) { Skin.create(:title => 'foo', :z_fs_skin => 'fs_skin-blog', :parent_id => nodes_id(:skins), :v_status => Zena::Status::Pub)} assert skin.errors.empty? end context 'with a normal user' do setup do login(:anon) visiting(:status) end should 'build template partial on template_path_from_template_url and ignore skin' do puts "\n\n\n\n ********************************************************" puts " ********************************************************" puts " ******************** RUNNING FS_SKIN TESTS **************" puts " ********************************************************" puts " ********************************************************\n\n\n" fullpath = fullpath_from_template_url('$fs_skin-blog/Node/pages', false) main_path = fullpath_from_template_url('$fs_skin-blog/Node/_main', false) FileUtils.rm(fullpath) if File.exist?(fullpath) FileUtils.rm(main_path) if File.exist?(main_path) assert_equal '/test.host/zafu/$fs_skin-blog/Node/en/pages.erb', template_path_from_template_url('', '$fs_skin-blog/Node/pages', true) assert File.exist?(main_path) assert File.exist?(fullpath) FileUtils.rm(fullpath) end end end # A page using a fs_skin Skin end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
zena-1.2.8 | bricks/fs_skin/zena/test/unit/fs_skin_view_test.rb |