Albirew/nyaa-pantsu
Albirew
/
nyaa-pantsu
Archivé
1
0
Bifurcation 0

Update template_functions_test.go

Cette révision appartient à :
kilo 2017-11-01 08:38:48 +01:00 révisé par GitHub
Parent 503b3acf58
révision d468912d25
Signature inconnue de Forgejo
ID de la clé GPG: 4AEE18F83AFDEB23
1 fichiers modifiés avec 1 ajouts et 25 suppressions

Voir le fichier

@ -200,31 +200,7 @@ func TestGetAvatar(t *testing.T) {
t.Errorf("Unexpected value from the function getAvatar, got '%s', wanted '%s' for '%s' and '%d'", value, test.Expected, test.Test, test.Size)
}
}
}
func TestFormatDateRFC(t *testing.T) {
location, _ := time.LoadLocation("UTC")
var tests = []struct {
Test time.Time
Expected string
}{
{
Test: time.Date(2016, 5, 4, 3, 2, 1, 10, location),
Expected: "2016-05-04T03:02:01Z",
},
{
Test: time.Now(),
Expected: time.Now().Format(time.RFC3339),
},
}
for _, test := range tests {
value := formatDateRFC(test.Test)
if value != test.Expected {
t.Errorf("Unexpected value from the function formatDateRFC, got '%s', wanted '%s' for '%s'", value, test.Expected, test.Test.String())
}
}
}
}
func TestGetCategory(t *testing.T) {
var tests = []struct {