1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
package integration
import (
"context"
"testing"
"github.com/stretchr/testify/require"
)
func TestSecurityQuestions_List(t *testing.T) {
warnSensitiveTest(t)
client, teardown := createTestClient(t, "fixtures/TestSecurityQuestions_List")
defer teardown()
questions, err := client.SecurityQuestionsList(context.Background())
require.NoError(t, err, "Error getting security questions, expected struct")
require.NotEmpty(t, questions.SecurityQuestions, "Expected to see security questions returned")
require.Equal(
t,
"What was the name of your first pet?",
questions.SecurityQuestions[0].Question,
"Expected question 'What was the name of your first pet?'",
)
}
|