api: re-use proper token constant

This commit is contained in:
Mitchell Hashimoto
2015-03-30 11:14:51 -07:00
parent 4b48996a41
commit f547b717a7
2 changed files with 6 additions and 8 deletions

View File

@@ -4,13 +4,15 @@ import (
"net/http"
"testing"
"time"
vaultHttp "github.com/hashicorp/vault/http"
)
func TestClientToken(t *testing.T) {
tokenValue := "foo"
handler := func(w http.ResponseWriter, req *http.Request) {
http.SetCookie(w, &http.Cookie{
Name: TokenCookieName,
Name: vaultHttp.AuthCookieName,
Value: tokenValue,
Expires: time.Now().Add(time.Hour),
})