debian/bullseye
debian/jessie
|
Last change
on this file since e6c9e70 was 1c22429, checked in by Joachim Langenbach <joachim.langenbach@…>, 10 years ago |
- gnuboat_epd adds the apt repository from gnuboat to install epd-fuse package
|
-
Property mode
set to
100755
|
|
File size:
791 bytes
|
| Line | |
|---|
| 1 | require 'spec_helper'
|
|---|
| 2 |
|
|---|
| 3 | describe 'strftime' do
|
|---|
| 4 | it "should exist" do
|
|---|
| 5 | expect(Puppet::Parser::Functions.function("strftime")).to eq("function_strftime")
|
|---|
| 6 | end
|
|---|
| 7 |
|
|---|
| 8 | it "should raise a ParseError if there is less than 1 arguments" do
|
|---|
| 9 | expect { scope.function_strftime([]) }.to( raise_error(Puppet::ParseError))
|
|---|
| 10 | end
|
|---|
| 11 |
|
|---|
| 12 | it "using %s should be higher then when I wrote this test" do
|
|---|
| 13 | result = scope.function_strftime(["%s"])
|
|---|
| 14 | expect(result.to_i).to(be > 1311953157)
|
|---|
| 15 | end
|
|---|
| 16 |
|
|---|
| 17 | it "using %s should be lower then 1.5 trillion" do
|
|---|
| 18 | result = scope.function_strftime(["%s"])
|
|---|
| 19 | expect(result.to_i).to(be < 1500000000)
|
|---|
| 20 | end
|
|---|
| 21 |
|
|---|
| 22 | it "should return a date when given %Y-%m-%d" do
|
|---|
| 23 | result = scope.function_strftime(["%Y-%m-%d"])
|
|---|
| 24 | expect(result).to match(/^\d{4}-\d{2}-\d{2}$/)
|
|---|
| 25 | end
|
|---|
| 26 | end
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.