init push
This commit is contained in:
14
internal/service/cookies_test.go
Normal file
14
internal/service/cookies_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package service
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestCookieValues(t *testing.T) {
|
||||
raw := "foo=1; wucher_at=old-token; bar=2; wucher_at=new-token"
|
||||
values := CookieValues(raw, "wucher_at")
|
||||
if len(values) != 2 {
|
||||
t.Fatalf("expected 2 cookie values, got %d", len(values))
|
||||
}
|
||||
if values[0] != "old-token" || values[1] != "new-token" {
|
||||
t.Fatalf("unexpected cookie order: %#v", values)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user