test: cover core bot and web scenarios
This commit is contained in:
@@ -66,6 +66,27 @@ public sealed class AuthorizedSessionServiceTests
|
||||
Assert.Equal(sessionId, session.Id);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetSessionForGmAsync_ReturnsNull_WhenSessionBelongsToAnotherGm()
|
||||
{
|
||||
var groupId = Guid.NewGuid();
|
||||
var sessionId = Guid.NewGuid();
|
||||
var store = new FakeSessionStore(
|
||||
groups:
|
||||
[
|
||||
new(groupId, 42, "Alpha", 2002L)
|
||||
],
|
||||
sessions:
|
||||
[
|
||||
new(sessionId, groupId, "Session A", DateTime.UtcNow, "Planned", "https://example.test/a", Guid.NewGuid(), 10, 42)
|
||||
]);
|
||||
var service = new AuthorizedSessionService(store);
|
||||
|
||||
var session = await service.GetSessionForGmAsync(sessionId, 1001L);
|
||||
|
||||
Assert.Null(session);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task UpdateSessionForGmAsync_Throws_WhenSessionBelongsToAnotherGm()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user