Sha256: 56b47f69fe60003c3800f0c7aa9b1081913d01086eded0bb71f26e363c7381e7
Contents?: true
Size: 624 Bytes
Versions: 13
Compression:
Stored size: 624 Bytes
Contents
# -*- encoding: utf-8 -*- require 'webgen/test_helper' require 'webgen/tag/date' require 'time' class TestTagDate < Minitest::Test include Webgen::TestHelper def test_call context = setup_context time = Time.now context[:config] = {'tag.date.format' => '%Y%m%d'} context[:chain] = [Webgen::Node.new(@website.tree.dummy_root, '/', '/', 'created_at' => time)] assert_equal(Time.now.strftime("%Y%m%d"), Webgen::Tag::Date.call('date', '', context)) context[:config]['tag.date.mi'] = 'created_at' assert_equal(time.strftime("%Y%m%d"), Webgen::Tag::Date.call('date', '', context)) end end
Version data entries
13 entries across 13 versions & 1 rubygems