13 lines
295 B
Go
13 lines
295 B
Go
package main
|
|
|
|
import "testing"
|
|
|
|
func TestDecodeWireTokenAllowsEmptyToken(t *testing.T) {
|
|
if got := decodeWireToken("-"); got != "" {
|
|
t.Fatalf("empty wire token decoded as %q", got)
|
|
}
|
|
if got := decodeWireToken("secret"); got != "secret" {
|
|
t.Fatalf("non-empty token changed: %q", got)
|
|
}
|
|
}
|