File: string_test.go

package info (click to toggle)
golang-github-lestrrat-go-jwx 2.1.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,872 kB
  • sloc: sh: 222; makefile: 86; perl: 62
file content (20 lines) | stat: -rw-r--r-- 469 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package types_test

import (
	"testing"

	"github.com/lestrrat-go/jwx/v2/jwt/internal/types"
	"github.com/stretchr/testify/assert"
)

func TestStringList_Accept(t *testing.T) {
	t.Parallel()

	var x types.StringList
	interfaceList := make([]interface{}, 0)
	interfaceList = append(interfaceList, "first")
	interfaceList = append(interfaceList, "second")
	if !assert.NoError(t, x.Accept(interfaceList), "failed to convert []interface{} into StringList") {
		return
	}
}