feat(domain): RemoteActor fields, RemoteNote, FetchRemoteActorPosts event, fetch_outbox_page port
This commit is contained in:
@@ -567,6 +567,14 @@ impl FederationActionPort for TestStore {
|
||||
) -> Result<String, DomainError> {
|
||||
Err(DomainError::NotFound)
|
||||
}
|
||||
|
||||
async fn fetch_outbox_page(
|
||||
&self,
|
||||
_outbox_url: &str,
|
||||
_page: u32,
|
||||
) -> Result<Vec<crate::models::remote_note::RemoteNote>, DomainError> {
|
||||
Ok(vec![])
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
@@ -833,6 +841,16 @@ mod federation_port_tests {
|
||||
let err = store.actor_json(&UserId::new()).await.unwrap_err();
|
||||
assert!(matches!(err, DomainError::NotFound));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_store_fetch_outbox_returns_empty() {
|
||||
let store = TestStore::default();
|
||||
let notes = store
|
||||
.fetch_outbox_page("https://example.com/outbox", 1)
|
||||
.await
|
||||
.unwrap();
|
||||
assert!(notes.is_empty());
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user