Sha256: 4d5f0f7337b7d47d406513b4e423dd2dd03cd28f7b4a0c9cf31a942a3b47bb44

Contents?: true

Size: 366 Bytes

Versions: 2

Compression:

Stored size: 366 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
    context[:config] = {'tag.date.format' => '%Y%m%d'}

    assert_equal(Time.now.strftime("%Y%m%d"), Webgen::Tag::Date.call('date', '', context))
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
webgen-1.1.0 test/webgen/tag/test_date.rb
webgen-1.0.0 test/webgen/tag/test_date.rb