Update test again

This commit is contained in:
Till Faelligen 2022-10-16 10:19:38 +02:00
parent 5896fbc394
commit 7ce3461ccc
No known key found for this signature in database
GPG key ID: 3DF82D8AB9211D4E

View file

@ -15,6 +15,7 @@ package transactions
import ( import (
"net/http" "net/http"
"net/url" "net/url"
"path/filepath"
"reflect" "reflect"
"strconv" "strconv"
"testing" "testing"
@ -27,8 +28,10 @@ type fakeType struct {
} }
func TestCompare(t *testing.T) { func TestCompare(t *testing.T) {
c1 := CacheKey{"1", "2", ""} u1, _ := url.Parse("/send/1?accessToken=123")
c2 := CacheKey{"1", "2", ""} u2, _ := url.Parse("/send/1")
c1 := CacheKey{"1", "2", filepath.Dir(u1.Path)}
c2 := CacheKey{"1", "2", filepath.Dir(u2.Path)}
if !reflect.DeepEqual(c1, c2) { if !reflect.DeepEqual(c1, c2) {
t.Fatalf("Cache keys differ: %+v <> %+v", c1, c2) t.Fatalf("Cache keys differ: %+v <> %+v", c1, c2)
} }