1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00
woodpecker/shared/model/util_test.go
2014-06-12 16:43:43 -07:00

20 lines
412 B
Go

package model
import (
"testing"
)
func Test_createGravatar(t *testing.T) {
var got, want = createGravatar("dr_cooper@caltech.edu"), "2b77ba83e2216ddcd11fe8c24b70c2a3"
if got != want {
t.Errorf("Got gravatar hash %s, want %s", got, want)
}
}
func Test_generateToken(t *testing.T) {
token := generateToken()
if len(token) != length {
t.Errorf("Want token length %d, got %d", length, len(token))
}
}