File: profile_security_question_test.go

package info (click to toggle)
golang-github-linode-linodego 1.55.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,112 kB
  • sloc: makefile: 96; sh: 52; python: 24
file content (27 lines) | stat: -rw-r--r-- 685 bytes parent folder | download
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?'",
	)
}