woodpecker/vendor/github.com/samalba/dockerclient/auth_test.go

16 lines
381 B
Go
Raw Normal View History

2015-05-22 18:37:40 +00:00
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)
}
}