(tenant_id: Option<Uuid>)
| 737 | } |
| 738 | |
| 739 | pub async fn create_application(tenant_id: Option<Uuid>) -> Application { |
| 740 | let tenant_id = match tenant_id { |
| 741 | Some(v) => v.into(), |
| 742 | None => { |
| 743 | let t = storage::tenant::test::create_tenant().await; |
| 744 | t.id |
| 745 | } |
| 746 | }; |
| 747 | |
| 748 | let a = Application { |
| 749 | tenant_id, |
| 750 | name: "test application".into(), |
| 751 | description: "test application description".into(), |
| 752 | ..Default::default() |
| 753 | }; |
| 754 | create(a).await.unwrap() |
| 755 | } |
| 756 | |
| 757 | #[tokio::test] |
| 758 | async fn test_application() { |