(now time.Time, users []*types.User)
| 59 | } |
| 60 | |
| 61 | func initCreds(now time.Time, users []*types.User) []*types.Credential { |
| 62 | creds := make([]*types.Credential, 0, 6) |
| 63 | creds = append(creds, &types.Credential{ // 0 |
| 64 | User: users[0].Id, |
| 65 | Method: "email", |
| 66 | Value: "alice@test.example.com", |
| 67 | Done: true, |
| 68 | }) |
| 69 | creds = append(creds, &types.Credential{ // 1 |
| 70 | User: users[1].Id, |
| 71 | Method: "email", |
| 72 | Value: "bob@test.example.com", |
| 73 | Done: true, |
| 74 | }) |
| 75 | creds = append(creds, &types.Credential{ // 2 |
| 76 | User: users[1].Id, |
| 77 | Method: "email", |
| 78 | Value: "bob@test.example.com", |
| 79 | }) |
| 80 | creds = append(creds, &types.Credential{ // 3 |
| 81 | User: users[2].Id, |
| 82 | Method: "tel", |
| 83 | Value: "+998991112233", |
| 84 | }) |
| 85 | creds = append(creds, &types.Credential{ // 4 |
| 86 | User: users[2].Id, |
| 87 | Method: "tel", |
| 88 | Value: "+998993332211", |
| 89 | Done: true, |
| 90 | }) |
| 91 | creds = append(creds, &types.Credential{ // 5 |
| 92 | User: users[2].Id, |
| 93 | Method: "email", |
| 94 | Value: "asdf@example.com", |
| 95 | }) |
| 96 | for _, cred := range creds { |
| 97 | cred.InitTimes() |
| 98 | } |
| 99 | creds[3].CreatedAt = now.Add(-10 * time.Minute) |
| 100 | creds[3].UpdatedAt = now.Add(-10 * time.Minute) |
| 101 | return creds |
| 102 | } |
| 103 | |
| 104 | func initAuthRecords(now time.Time, users []*types.User) []common.AuthRecord { |
| 105 | recs := make([]common.AuthRecord, 0, 2) |
no test coverage detected
searching dependent graphs…