Skip to content

Commit

Permalink
fixed ordering issue in test
Browse files Browse the repository at this point in the history
  • Loading branch information
yawn committed Jun 13, 2024
1 parent 894685a commit 08ac73f
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions ykoath_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package ykoath

import (
"fmt"
"slices"
"sort"
"testing"
"time"
Expand Down Expand Up @@ -392,10 +393,10 @@ func TestList(t *testing.T) {

func TestPutAndCalculateTestVector(t *testing.T) {

tt := []struct{
Name string
tt := []struct {
Name string
Query string
} {
}{
{
"full identifier",
"testvector",
Expand Down Expand Up @@ -527,7 +528,11 @@ func TestPutAndCalculateTestVector(t *testing.T) {

_, err = client.Calculate("test", nil)

assert.EqualError(err, "multiple matches found (testvector1,testvector2)")
if msg := err.Error(); !slices.Contains([]string{
"multiple matches found (testvector1,testvector2)",
"multiple matches found (testvector2,testvector1)"}, msg) {
assert.Fail(fmt.Sprintf("unexpected error message %q", msg))
}

testCard.AssertExpectations(t)
})
Expand Down

0 comments on commit 08ac73f

Please sign in to comment.