refactor: add cache tests and remove cache merge task (#14)

This commit is contained in:
l3uddz
2021-02-19 19:15:38 +00:00
committed by GitHub
parent 54cfd68810
commit e1945cf714
18 changed files with 537 additions and 61 deletions

29
util/string_test.go Normal file
View File

@@ -0,0 +1,29 @@
package util
import "testing"
func TestStripNonAlphaNumeric(t *testing.T) {
type args struct {
value string
}
tests := []struct {
name string
args args
want string
}{
{
name: "remove trailing slash",
args: args{
value: "tt1234567/",
},
want: "tt1234567",
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := StripNonAlphaNumeric(tt.args.value); got != tt.want {
t.Errorf("StripNonAlphaNumeric() = %v, want %v", got, tt.want)
}
})
}
}