fix:#65 added new UID generation for ical File

This commit is contained in:
masterelmar
2023-11-29 11:23:43 +01:00
parent fe4ba9e529
commit f1d178049e
3 changed files with 39 additions and 6 deletions

View File

@ -31,3 +31,24 @@ func TestOnlyWhitespace(t *testing.T) {
})
}
}
func TestHashString(t *testing.T) {
type args struct {
s string
}
tests := []struct {
name string
args args
want string
}{
{"empty string", args{""}, "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"},
{"non-empty string", args{"abc"}, "ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := HashString(tt.args.s); got != tt.want {
t.Errorf("HashString() = %v, want %v", got, tt.want)
}
})
}
}