Fixed test after renaming images

This commit is contained in:
enscogitans 2020-02-22 01:31:06 +03:00 committed by Fedor Korotkiy
parent 55487a2b51
commit ae09c59b26

View file

@ -132,9 +132,10 @@ func TestDigitalClock_valid(t *testing.T) {
for _, f := range files { for _, f := range files {
t.Run(f.Name(), func(t *testing.T) { t.Run(f.Name(), func(t *testing.T) {
parts := strings.SplitN(strings.TrimSuffix(f.Name(), ".png"), "_", 2) parts := strings.SplitN(strings.TrimSuffix(f.Name(), ".png"), "_", 2)
time := strings.Replace(parts[0], ".", ":", 2)
v := url.Values{} v := url.Values{}
v.Add("time", parts[0]) v.Add("time", time)
v.Add("k", parts[1]) v.Add("k", parts[1])
u := fmt.Sprintf("http://localhost:%s/?%s", port, v.Encode()) u := fmt.Sprintf("http://localhost:%s/?%s", port, v.Encode())