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)
	}
}
