...
1 package session
2
3 import (
4 "testing"
5
6 "github.com/stretchr/testify/assert"
7 )
8
9 func TestString(t *testing.T) {
10 testcases := []struct {
11 title string
12 provider AuthProvider
13 expected string
14 }{
15 {
16 title: "Test Case 1 - BSLAuthProvider",
17 provider: BSLAuthProvider,
18 expected: "bsl",
19 },
20 {
21 title: "Test Case 2 - OktaAuthProvider",
22 provider: OktaAuthProvider,
23 expected: "okta",
24 },
25 }
26 for _, testcase := range testcases {
27 t.Run(testcase.title, func(t *testing.T) {
28 assert.Equal(t, testcase.expected, testcase.provider.String())
29 })
30 }
31 }
32
View as plain text