Skip to content

Commit

Permalink
Add test for empty mission definitions list
Browse files Browse the repository at this point in the history
  • Loading branch information
aeshub committed Jan 24, 2025
1 parent 8c0c791 commit 6d32db0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions backend/api.test/Controllers/MissionDefinitionControllerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,5 +80,17 @@ public async Task CheckThatListAllMissionDefinitionsEndpointReturnsSuccess()

Assert.Single(missionDefinitions!);
}

[Fact]
public async Task CheckThatListAllMissionDefinitionsSucceedWhenThereAreNoMissionDefinitions()
{
var response = await Client.GetAsync("missions/definitions");

var missionDefinitions = await response.Content.ReadFromJsonAsync<
List<MissionDefinitionResponse>
>(SerializerOptions);

Assert.Empty(missionDefinitions!);
}
}
}

0 comments on commit 6d32db0

Please sign in to comment.