feat(worker): session skills SignalR surface + per-level persistence
This commit is contained in:
@@ -72,6 +72,43 @@ public class AppSettingsRepositoryTests : IDisposable
|
||||
Assert.Null(row.CentralWorktreeRoot);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task UpdateAsync_Persists_SessionSkills_Json()
|
||||
{
|
||||
using (var ctx = _db.CreateContext())
|
||||
{
|
||||
var repo = new AppSettingsRepository(ctx);
|
||||
await repo.UpdateAsync(new AppSettingsEntity
|
||||
{
|
||||
SessionSkills = "[\"ponytail\",\"ponytail-help\"]",
|
||||
});
|
||||
}
|
||||
|
||||
using var readCtx = _db.CreateContext();
|
||||
var row = await new AppSettingsRepository(readCtx).GetAsync();
|
||||
Assert.Equal("[\"ponytail\",\"ponytail-help\"]", row.SessionSkills);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task UpdateAsync_Blank_SessionSkills_Stored_As_Null()
|
||||
{
|
||||
using (var ctx = _db.CreateContext())
|
||||
{
|
||||
var repo = new AppSettingsRepository(ctx);
|
||||
await repo.UpdateAsync(new AppSettingsEntity { SessionSkills = "[\"a\"]" });
|
||||
}
|
||||
|
||||
using (var ctx = _db.CreateContext())
|
||||
{
|
||||
var repo = new AppSettingsRepository(ctx);
|
||||
await repo.UpdateAsync(new AppSettingsEntity { SessionSkills = null });
|
||||
}
|
||||
|
||||
using var readCtx = _db.CreateContext();
|
||||
var row = await new AppSettingsRepository(readCtx).GetAsync();
|
||||
Assert.Null(row.SessionSkills);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task DailyPrepMaxTasks_defaults_to_5_and_persists()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user