fix cookie -- not working
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"crypto/md5"
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDeriveCookieNameMatchesFallbackPrestashopRule(t *testing.T) {
|
||||
cfg := Config{PrestaShopVersion: "1.7.3"}
|
||||
|
||||
got := cfg.DeriveCookieName("localhost")
|
||||
sum := md5.Sum([]byte("1.7.3" + "ps-s1"))
|
||||
want := fmt.Sprintf("PrestaShop-%x", sum)
|
||||
|
||||
if got != want {
|
||||
t.Fatalf("DeriveCookieName() = %q, want %q", got, want)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user