feature: RBAC + Clinical Audit Logging
This commit is contained in:
@@ -15,6 +15,7 @@ public class AlertLifecycleTests : IAsyncLifetime
|
||||
{
|
||||
_fixture = fixture;
|
||||
_client = fixture.CreateClient();
|
||||
_client.AsNurse();
|
||||
}
|
||||
|
||||
public async Task InitializeAsync()
|
||||
@@ -56,14 +57,14 @@ public class AlertLifecycleTests : IAsyncLifetime
|
||||
{
|
||||
var resp = await _client.PostAsJsonAsync(
|
||||
$"/api/v1/alerts/{_alertId}/acknowledge",
|
||||
new { clinicianId = "DR-OSEI", note = "Reviewing now, ordering repeat labs." });
|
||||
new AcknowledgeAlertRequest("Reviewing now, ordering repeat labs."));
|
||||
|
||||
resp.StatusCode.Should().Be(HttpStatusCode.OK);
|
||||
var body = await resp.Content.ReadFromJsonAsync<JsonDocument>();
|
||||
body!.RootElement.GetProperty("data").GetProperty("status").GetString()
|
||||
.Should().Be("Acknowledged");
|
||||
body.RootElement.GetProperty("data").GetProperty("acknowledgedBy").GetString()
|
||||
.Should().Be("DR-OSEI");
|
||||
.Should().Be("Test NURSE");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -81,7 +82,7 @@ public class AlertLifecycleTests : IAsyncLifetime
|
||||
{
|
||||
await _client.PostAsJsonAsync(
|
||||
$"/api/v1/alerts/{_alertId}/acknowledge",
|
||||
new { clinicianId = "DR-PATEL", note = "Treated." });
|
||||
new AcknowledgeAlertRequest("Treated."));
|
||||
|
||||
var resolveResp = await _client.PostAsync(
|
||||
$"/api/v1/alerts/{_alertId}/resolve", null);
|
||||
|
||||
Reference in New Issue
Block a user