Sha256: 03cbd4d153081d0e6b5368d150090d2f866a493e3b18a600f634693913863055

Contents?: true

Size: 673 Bytes

Versions: 15

Compression:

Stored size: 673 Bytes

Contents

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

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

class TestPathHandlerPage < Minitest::Test

  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'], node.blocks)
    assert_equal('/default.en.html', node.alcn)
  end

end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
webgen-1.7.3 test/webgen/path_handler/test_page.rb
webgen-1.7.2 test/webgen/path_handler/test_page.rb
webgen-1.7.1 test/webgen/path_handler/test_page.rb
webgen-1.7.0 test/webgen/path_handler/test_page.rb
webgen-1.6.0 test/webgen/path_handler/test_page.rb
webgen-1.5.2 test/webgen/path_handler/test_page.rb
webgen-1.5.1 test/webgen/path_handler/test_page.rb
webgen-1.5.0 test/webgen/path_handler/test_page.rb
webgen-1.4.1 test/webgen/path_handler/test_page.rb
webgen-1.4.0 test/webgen/path_handler/test_page.rb
webgen-1.3.0 test/webgen/path_handler/test_page.rb
webgen-1.2.1 test/webgen/path_handler/test_page.rb
webgen-1.2.0 test/webgen/path_handler/test_page.rb
webgen-1.1.0 test/webgen/path_handler/test_page.rb
webgen-1.0.0 test/webgen/path_handler/test_page.rb