Add comprehensive backend test suite and helper access
This commit is contained in:
@@ -43,4 +43,11 @@ internal static class TestClientExtensions
|
||||
var json = await response.Content.ReadFromJsonAsync<JsonElement>();
|
||||
return json.GetProperty("id").GetInt32();
|
||||
}
|
||||
|
||||
public static async Task<Guid> GetProfileIdAsync(this HttpClient client)
|
||||
{
|
||||
var me = await client.GetFromJsonAsync<JsonElement>("/api/me");
|
||||
return Guid.Parse(me.GetProperty("id").GetString()!);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user