(t *testing.T)
| 568 | } |
| 569 | |
| 570 | func TestGetResourceFromPath(t *testing.T) { |
| 571 | tests := []struct { |
| 572 | name string |
| 573 | path string |
| 574 | expected Resource |
| 575 | }{ |
| 576 | { |
| 577 | name: "Valid ledger path", |
| 578 | path: "/ledgers", |
| 579 | expected: ResourceLedgers, |
| 580 | }, |
| 581 | { |
| 582 | name: "Valid accounts path with ID", |
| 583 | path: "/accounts/123", |
| 584 | expected: ResourceAccounts, |
| 585 | }, |
| 586 | { |
| 587 | name: "Valid mocked account path", |
| 588 | path: "/mocked-account", |
| 589 | expected: ResourceAccounts, |
| 590 | }, |
| 591 | { |
| 592 | name: "Valid transactions path", |
| 593 | path: "/transactions", |
| 594 | expected: ResourceTransactions, |
| 595 | }, |
| 596 | { |
| 597 | name: "Valid identities path with ID", |
| 598 | path: "/identities/xyz", |
| 599 | expected: ResourceIdentities, |
| 600 | }, |
| 601 | { |
| 602 | name: "Valid balances path", |
| 603 | path: "/balances", |
| 604 | expected: ResourceBalances, |
| 605 | }, |
| 606 | { |
| 607 | name: "Valid balance-monitors path", |
| 608 | path: "/balance-monitors", |
| 609 | expected: ResourceBalanceMonitors, |
| 610 | }, |
| 611 | { |
| 612 | name: "Valid hooks path", |
| 613 | path: "/hooks", |
| 614 | expected: ResourceHooks, |
| 615 | }, |
| 616 | { |
| 617 | name: "Valid api-keys path", |
| 618 | path: "/api-keys", |
| 619 | expected: ResourceAPIKeys, |
| 620 | }, |
| 621 | { |
| 622 | name: "Valid search path", |
| 623 | path: "/search", |
| 624 | expected: ResourceSearch, |
| 625 | }, |
| 626 | { |
| 627 | name: "Valid reconciliation path", |
nothing calls this directly
no test coverage detected