TestGenerateState verifies that the generateState function creates unique, properly formatted state strings for OAuth authentication.
(t *testing.T)
| 121 | // TestGenerateState verifies that the generateState function creates unique, |
| 122 | // properly formatted state strings for OAuth authentication. |
| 123 | func TestGenerateState(t *testing.T) { |
| 124 | state1, err := generateState() |
| 125 | require.NoError(t, err) |
| 126 | assert.NotEmpty(t, state1) |
| 127 | assert.Len(t, state1, 44) |
| 128 | |
| 129 | state2, err := generateState() |
| 130 | require.NoError(t, err) |
| 131 | assert.NotEqual(t, state1, state2) |
| 132 | } |
| 133 | |
| 134 | // TestBuildAuthURL verifies that the buildAuthURL function correctly constructs |
| 135 | // OAuth authentication URLs with proper state and return URI parameters. |
nothing calls this directly
no test coverage detected