(t *testing.T)
| 386 | } |
| 387 | |
| 388 | func TestAuthGetRecord(t *testing.T) { |
| 389 | recId, authLvl, secret, expires, err := adp.AuthGetRecord(types.ParseUserId("usr"+testData.Recs[0].UserId), "basic") |
| 390 | if err != nil { |
| 391 | t.Fatal(err) |
| 392 | } |
| 393 | if recId != testData.Recs[0].Unique || |
| 394 | authLvl != testData.Recs[0].AuthLvl || |
| 395 | !reflect.DeepEqual(secret, testData.Recs[0].Secret) || |
| 396 | expires != testData.Recs[0].Expires { |
| 397 | |
| 398 | got := fmt.Sprintf("%v %v %v %v", recId, authLvl, secret, expires) |
| 399 | want := fmt.Sprintf("%v %v %v %v", testData.Recs[0].Unique, testData.Recs[0].AuthLvl, testData.Recs[0].Secret, testData.Recs[0].Expires) |
| 400 | t.Error(mismatchErrorString("Auth record", got, want)) |
| 401 | } |
| 402 | |
| 403 | // Test not found |
| 404 | recId, _, _, _, err = adp.AuthGetRecord(types.Uid(123), "scheme") |
| 405 | if err != types.ErrNotFound { |
| 406 | t.Error("Auth record found but shouldn't. recId:", recId) |
| 407 | } |
| 408 | } |
| 409 | |
| 410 | func TestTopicGet(t *testing.T) { |
| 411 | got, err := adp.TopicGet(testData.Topics[0].Id) |
nothing calls this directly
no test coverage detected
searching dependent graphs…