This commit is contained in:
@@ -6,7 +6,7 @@ on:
|
||||
- main
|
||||
|
||||
env:
|
||||
VERSION: 1.11.0
|
||||
VERSION: 1.12.0
|
||||
|
||||
jobs:
|
||||
# ЧАСТЬ 1: Собираем образы и кладем в Gitea (чтобы делиться с ребятами)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<Version>1.11.0</Version>
|
||||
<Version>1.12.0</Version>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<LangVersion>preview</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
+2
-2
@@ -17,7 +17,7 @@ services:
|
||||
retries: 10
|
||||
|
||||
bot:
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-bot:1.11.0
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-bot:1.12.0
|
||||
restart: always
|
||||
depends_on:
|
||||
db:
|
||||
@@ -30,7 +30,7 @@ services:
|
||||
- gmrelay
|
||||
|
||||
web:
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-web:1.11.0
|
||||
image: git.codeanddice.ru/toutsu/gmrelay-web:1.12.0
|
||||
restart: always
|
||||
depends_on:
|
||||
db:
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<div class="nav-version">v1.11.0</div>
|
||||
<div class="nav-version">v1.12.0</div>
|
||||
</div>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
|
||||
@@ -244,6 +244,50 @@ public sealed class AuthorizedSessionServiceTests
|
||||
Assert.Empty(store.LogEntries);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetSessionHistoryForGmAsync_ReturnsHistory_WhenSessionBelongsToOwnedGroup()
|
||||
{
|
||||
var gmId = 1001L;
|
||||
var groupId = Guid.NewGuid();
|
||||
var sessionId = Guid.NewGuid();
|
||||
var store = new FakeSessionStore(
|
||||
groups:
|
||||
[
|
||||
new(groupId, 42, "Alpha", gmId)
|
||||
],
|
||||
sessions:
|
||||
[
|
||||
new(sessionId, groupId, "Session A", DateTime.UtcNow, "Planned", "https://example.test/a", Guid.NewGuid(), 10, 42, 4, 1, 0)
|
||||
]);
|
||||
var service = new AuthorizedSessionService(store);
|
||||
|
||||
var history = await service.GetSessionHistoryForGmAsync(sessionId, gmId);
|
||||
|
||||
Assert.NotNull(history);
|
||||
Assert.Empty(history);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task GetSessionHistoryForGmAsync_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, 4, 1, 0)
|
||||
]);
|
||||
var service = new AuthorizedSessionService(store);
|
||||
|
||||
var history = await service.GetSessionHistoryForGmAsync(sessionId, 1001L);
|
||||
|
||||
Assert.Null(history);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task PromoteWaitlistedPlayerForGmAsync_PromotesOwnedSession()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user