Sha256: c6a73144edbe673d9c151378025c315783c02da089fdc337bf9ae647ae2b1f49

Contents?: true

Size: 690 Bytes

Versions: 1

Compression:

Stored size: 690 Bytes

Contents

# -*- encoding: utf-8 -*-

require 'webgen/test_helper'
require 'webgen/path_handler/page'
require 'webgen/path'

class TestPathHandlerPage < MiniTest::Unit::TestCase

  include Webgen::TestHelper

  def setup
    setup_website('website.lang' => 'en')
    @root = Webgen::Node.new(@website.tree.dummy_root, '/', '/')
    @page = Webgen::PathHandler::Page.new(@website)
  end

  def test_create_node
    path = Webgen::Path.new('/default.page', 'dest_path' => '<parent><basename><ext>') { StringIO.new('test') }
    node = @page.create_nodes(path, ['content'])
    refute_nil(node)
    assert_equal(['content'], @page.blocks(node))
    assert_equal('/default.en.html', node.alcn)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
webgen-1.0.0.beta1 test/webgen/path_handler/test_page.rb