registry/auth/token: use consistent names for test-tables

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-04-30 15:05:51 +02:00
parent f884a079df
commit 5e67a40e08
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
1 changed files with 5 additions and 6 deletions

View File

@ -7,7 +7,7 @@ import (
func TestAudienceList_Unmarshal(t *testing.T) {
t.Run("OK", func(t *testing.T) {
testCases := []struct {
tests := []struct {
value string
expected AudienceList
}{
@ -25,18 +25,17 @@ func TestAudienceList_Unmarshal(t *testing.T) {
},
}
for _, testCase := range testCases {
testCase := testCase
for _, tc := range tests {
tc := tc
t.Run("", func(t *testing.T) {
var actual AudienceList
err := json.Unmarshal([]byte(testCase.value), &actual)
err := json.Unmarshal([]byte(tc.value), &actual)
if err != nil {
t.Fatal(err)
}
assertStringListEqual(t, testCase.expected, actual)
assertStringListEqual(t, tc.expected, actual)
})
}
})