-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinvitation_test.go
36 lines (31 loc) · 928 Bytes
/
invitation_test.go
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
28
29
30
31
32
33
34
35
36
package checkr
import (
"testing"
randomdata "github.com/pallinder/go-randomdata"
"github.com/stretchr/testify/require"
)
func TestInvitation(t *testing.T) {
// Load Key & Create Client
apiKey := LoadKey(t)
c := NewClient(apiKey)
// Create Candidate for Testing
candidate := Candidate{
FirstName: randomdata.FirstName(randomdata.RandomGender),
NoMiddleName: true,
LastName: randomdata.LastName(),
Email: randomdata.Email(),
DOB: "1970-01-25",
SSN: "111-11-2001",
Zipcode: "49503",
DriverLicenseNumber: "F1112001",
DriverLicenseState: "CA",
CustomID: randomdata.Digits(14),
}
cand, err := c.CreateCandidate(candidate)
require.NoError(t, err)
require.NotNil(t, cand)
// Create Invitation
inv, err := c.CreateInvitation("driver_pro", cand.ID)
require.NoError(t, err)
require.NotNil(t, inv)
}