summaryrefslogtreecommitdiff
path: root/internal/util/time_test.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2022-05-28 19:59:55 +0200
committerLibravatar GitHub <noreply@github.com>2022-05-28 18:59:55 +0100
commitae5402ada6aa794a69de455f745934b27e030d3d (patch)
tree93d228443da821b0b38cc1417742e65e92e5edec /internal/util/time_test.go
parent[frontend] Reduce width of profile img with screen width (#615) (diff)
downloadgotosocial-ae5402ada6aa794a69de455f745934b27e030d3d.tar.xz
[chore] Mastodon api fixups (#617)
* don't omitempty on description * don't omitempty on any fields * add ms to timestamp format * don't omitempty on text_url * rearrange attachment fields a bit * just give URL again as attachment text url * update tests * fix accidental replace
Diffstat (limited to 'internal/util/time_test.go')
-rw-r--r--internal/util/time_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/util/time_test.go b/internal/util/time_test.go
index 1d49e82af..5343c21a4 100644
--- a/internal/util/time_test.go
+++ b/internal/util/time_test.go
@@ -33,19 +33,19 @@ type TimeSuite struct {
func (suite *TimeSuite) TestISO8601Format1() {
testTime := testrig.TimeMustParse("2022-05-17T13:10:59Z")
testTimeString := util.FormatISO8601(testTime)
- suite.Equal("2022-05-17T13:10:59Z", testTimeString)
+ suite.Equal("2022-05-17T13:10:59.00Z", testTimeString)
}
func (suite *TimeSuite) TestISO8601Format2() {
testTime := testrig.TimeMustParse("2022-05-09T07:34:35+02:00")
testTimeString := util.FormatISO8601(testTime)
- suite.Equal("2022-05-09T05:34:35Z", testTimeString)
+ suite.Equal("2022-05-09T05:34:35.00Z", testTimeString)
}
func (suite *TimeSuite) TestISO8601Format3() {
testTime := testrig.TimeMustParse("2021-10-04T10:52:36+02:00")
testTimeString := util.FormatISO8601(testTime)
- suite.Equal("2021-10-04T08:52:36Z", testTimeString)
+ suite.Equal("2021-10-04T08:52:36.00Z", testTimeString)
}
func TestTimeSuite(t *testing.T) {