()
| 263 | #[tokio::test] |
| 264 | #[expect(clippy::too_many_lines)] |
| 265 | async fn get_entity_links() { |
| 266 | let alice = serde_json::from_str(entity::PERSON_ALICE_V1).expect("could not parse entity"); |
| 267 | let bob = serde_json::from_str(entity::PERSON_BOB_V1).expect("could not parse entity"); |
| 268 | let charles = serde_json::from_str(entity::PERSON_CHARLES_V1).expect("could not parse entity"); |
| 269 | |
| 270 | let mut database = DatabaseTestWrapper::new().await; |
| 271 | let mut api = database |
| 272 | .seed( |
| 273 | [ |
| 274 | data_type::VALUE_V1, |
| 275 | data_type::TEXT_V1, |
| 276 | data_type::NUMBER_V1, |
| 277 | ], |
| 278 | [ |
| 279 | property_type::NAME_V1, |
| 280 | property_type::AGE_V1, |
| 281 | property_type::FAVORITE_SONG_V1, |
| 282 | property_type::FAVORITE_FILM_V1, |
| 283 | property_type::HOBBY_V1, |
| 284 | property_type::INTERESTS_V1, |
| 285 | ], |
| 286 | [ |
| 287 | entity_type::LINK_V1, |
| 288 | entity_type::link::FRIEND_OF_V1, |
| 289 | entity_type::link::ACQUAINTANCE_OF_V1, |
| 290 | entity_type::PERSON_V1, |
| 291 | ], |
| 292 | ) |
| 293 | .await |
| 294 | .expect("could not seed database"); |
| 295 | |
| 296 | let person_type_id = VersionedUrl { |
| 297 | base_url: BaseUrl::new( |
| 298 | "https://blockprotocol.org/@alice/types/entity-type/person/".to_owned(), |
| 299 | ) |
| 300 | .expect("couldn't construct Base URL"), |
| 301 | version: OntologyTypeVersion { |
| 302 | major: 1, |
| 303 | pre_release: None, |
| 304 | }, |
| 305 | }; |
| 306 | |
| 307 | let friend_link_type_id = VersionedUrl { |
| 308 | base_url: BaseUrl::new( |
| 309 | "https://blockprotocol.org/@alice/types/entity-type/friend-of/".to_owned(), |
| 310 | ) |
| 311 | .expect("couldn't construct Base URL"), |
| 312 | version: OntologyTypeVersion { |
| 313 | major: 1, |
| 314 | pre_release: None, |
| 315 | }, |
| 316 | }; |
| 317 | |
| 318 | let acquaintance_entity_link_type_id = VersionedUrl { |
| 319 | base_url: BaseUrl::new( |
| 320 | "https://blockprotocol.org/@alice/types/entity-type/acquaintance-of/".to_owned(), |
| 321 | ) |
| 322 | .expect("couldn't construct Base URL"), |
nothing calls this directly
no test coverage detected