Task to retroactively update Mural statuses (#4769)

* Task to retroactively update Mural statuses

* cargo sqlx prepare

* wip: add tests

* Prepare

* Fix up test

* start on muralpay mock

* Move mocking to muralpay crate
This commit is contained in:
aecsocket
2025-11-13 18:16:41 +00:00
committed by GitHub
parent 70e2138248
commit c27f787c91
24 changed files with 906 additions and 10 deletions

View File

@@ -14,6 +14,8 @@ use crate::{
impl MuralPay {
pub async fn get_all_accounts(&self) -> Result<Vec<Account>, MuralError> {
mock!(self, get_all_accounts());
self.http_get(|base| format!("{base}/api/accounts"))
.send_mural()
.await
@@ -23,6 +25,8 @@ impl MuralPay {
&self,
id: AccountId,
) -> Result<Account, MuralError> {
mock!(self, get_account(id));
self.http_get(|base| format!("{base}/api/accounts/{id}"))
.send_mural()
.await
@@ -33,6 +37,14 @@ impl MuralPay {
name: impl AsRef<str>,
description: Option<impl AsRef<str>>,
) -> Result<Account, MuralError> {
mock!(
self,
create_account(
name.as_ref(),
description.as_ref().map(|x| x.as_ref()),
)
);
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
struct Body<'a> {