Skip to content

Commit

Permalink
Update unit tests to handle quoted timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
wkozaczuk committed Sep 18, 2018
1 parent 0ed027f commit 1837cff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions cmd/package_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (s *suite) TestInitPackage(c *C) {
name: name
title: title
author: author
created: {TIMESTAMP}
created: "{TIMESTAMP}"
`,
},
{
Expand All @@ -133,7 +133,7 @@ func (s *suite) TestInitPackage(c *C) {
title: title
author: author
version: 1.2.3
created: {TIMESTAMP}
created: "{TIMESTAMP}"
`,
},
{
Expand All @@ -151,7 +151,7 @@ func (s *suite) TestInitPackage(c *C) {
require:
- demo1
- demo2
created: {TIMESTAMP}
created: "{TIMESTAMP}"
`,
},
{
Expand All @@ -166,7 +166,7 @@ func (s *suite) TestInitPackage(c *C) {
name: name
title: title
author: author
created: {TIMESTAMP}
created: "{TIMESTAMP}"
`,
},
{
Expand All @@ -181,7 +181,7 @@ func (s *suite) TestInitPackage(c *C) {
name: name
title: title
author: author
created: {TIMESTAMP}
created: "{TIMESTAMP}"
platform: Ubuntu-14.04
`,
},
Expand Down
6 changes: 3 additions & 3 deletions core/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ func (*yamlSuite) TestYamlTimeFieldMarshall(c *C) {
{
"simple",
"2017-09-14T18:08:16+02:00",
"created: 2017-09-14T18:08:16+02:00",
"created: \"2017-09-14T18:08:16+02:00\"",
},
{
"miliseconds should not get marshalled",
"2017-09-14T18:08:16.123456789+02:00",
"created: 2017-09-14T18:08:16+02:00",
"created: \"2017-09-14T18:08:16+02:00\"",
},
{
"empty",
Expand Down Expand Up @@ -80,7 +80,7 @@ func (*yamlSuite) TestYamlTimeFieldUnmarshall(c *C) {
}{
{
"RFC3339",
"created: 2017-09-14T18:08:16+02:00",
"created: \"2017-09-14T18:08:16+02:00\"",
"2017-09-14 18:08",
},
{
Expand Down

0 comments on commit 1837cff

Please sign in to comment.