(t *testing.T)
| 499 | } |
| 500 | |
| 501 | func TestFindFirstRecordByData(t *testing.T) { |
| 502 | t.Parallel() |
| 503 | |
| 504 | app, _ := tests.NewTestApp() |
| 505 | defer app.Cleanup() |
| 506 | |
| 507 | scenarios := []struct { |
| 508 | collectionIdOrName string |
| 509 | key string |
| 510 | value any |
| 511 | expectId string |
| 512 | expectError bool |
| 513 | }{ |
| 514 | { |
| 515 | "missing", |
| 516 | "id", |
| 517 | "llvuca81nly1qls", |
| 518 | "llvuca81nly1qls", |
| 519 | true, |
| 520 | }, |
| 521 | { |
| 522 | "demo2", |
| 523 | "", |
| 524 | "llvuca81nly1qls", |
| 525 | "", |
| 526 | true, |
| 527 | }, |
| 528 | { |
| 529 | "demo2", |
| 530 | "invalid_or_missing", |
| 531 | "llvuca81nly1qls", |
| 532 | "", |
| 533 | true, |
| 534 | }, |
| 535 | { |
| 536 | "demo2", |
| 537 | "id", |
| 538 | "invalid", |
| 539 | "", |
| 540 | true, |
| 541 | }, |
| 542 | { |
| 543 | "demo2", |
| 544 | "id", |
| 545 | "llvuca81nly1qls", |
| 546 | "llvuca81nly1qls", |
| 547 | false, |
| 548 | }, |
| 549 | { |
| 550 | "sz5l5z67tg7gku0", |
| 551 | "title", |
| 552 | "test3", |
| 553 | "0yxhwia2amd8gec", |
| 554 | false, |
| 555 | }, |
| 556 | } |
| 557 | |
| 558 | for i, s := range scenarios { |
nothing calls this directly
no test coverage detected
searching dependent graphs…