1
0
mirror of https://github.com/drone/drone-cli.git synced 2026-01-16 07:51:33 +01:00
drone-cli/vendor/github.com/samalba/dockerclient/auth_test.go
2015-10-24 17:06:46 -07:00

16 lines
384 B
Go

package dockerclient
import (
"testing"
)
func TestAuthEncode(t *testing.T) {
a := AuthConfig{Username: "foo", Password: "password", Email: "bar@baz.com"}
expected := "eyJ1c2VybmFtZSI6ImZvbyIsInBhc3N3b3JkIjoicGFzc3dvcmQiLCJlbWFpbCI6ImJhckBiYXouY29tIn0K"
got, _ := a.encode()
if expected != got {
t.Errorf("testAuthEncode failed. Expected [%s] got [%s]", expected, got)
}
}