(t *testing.T)
| 85 | } |
| 86 | |
| 87 | func TestExternalAuthProvider(t *testing.T) { |
| 88 | t.Parallel() |
| 89 | |
| 90 | app, _ := tests.NewTestApp() |
| 91 | defer app.Cleanup() |
| 92 | |
| 93 | ea := core.NewExternalAuth(app) |
| 94 | |
| 95 | testValues := []string{"test_1", "test2", ""} |
| 96 | for i, testValue := range testValues { |
| 97 | t.Run(fmt.Sprintf("%d_%q", i, testValue), func(t *testing.T) { |
| 98 | ea.SetProvider(testValue) |
| 99 | |
| 100 | if v := ea.Provider(); v != testValue { |
| 101 | t.Fatalf("Expected getter %q, got %q", testValue, v) |
| 102 | } |
| 103 | |
| 104 | if v := ea.GetString("provider"); v != testValue { |
| 105 | t.Fatalf("Expected field value %q, got %q", testValue, v) |
| 106 | } |
| 107 | }) |
| 108 | } |
| 109 | } |
| 110 | |
| 111 | func TestExternalAuthProviderId(t *testing.T) { |
| 112 | t.Parallel() |
nothing calls this directly
no test coverage detected
searching dependent graphs…