Merge branch 'claudedo/0b2fbb48d44c41558c21d3464c0bd5c2'
This commit is contained in:
@@ -96,6 +96,38 @@ public sealed class ListRepositoryConfigTests : IDisposable
|
||||
Assert.Null(fetched.SessionSkills);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SetConfig_Persists_VerifyCommand_On_Insert()
|
||||
{
|
||||
await _repo.SetConfigAsync(new ListConfigEntity { ListId = _listId, VerifyCommand = "dotnet test" });
|
||||
|
||||
var fetched = await _repo.GetConfigAsync(_listId);
|
||||
Assert.NotNull(fetched);
|
||||
Assert.Equal("dotnet test", fetched.VerifyCommand);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SetConfig_Persists_VerifyCommand_On_Update()
|
||||
{
|
||||
await _repo.SetConfigAsync(new ListConfigEntity { ListId = _listId, VerifyCommand = "dotnet build" });
|
||||
await _repo.SetConfigAsync(new ListConfigEntity { ListId = _listId, VerifyCommand = "dotnet test" });
|
||||
|
||||
var fetched = await _repo.GetConfigAsync(_listId);
|
||||
Assert.NotNull(fetched);
|
||||
Assert.Equal("dotnet test", fetched.VerifyCommand);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SetConfig_Null_VerifyCommand_Clears_On_Update()
|
||||
{
|
||||
await _repo.SetConfigAsync(new ListConfigEntity { ListId = _listId, VerifyCommand = "dotnet test" });
|
||||
await _repo.SetConfigAsync(new ListConfigEntity { ListId = _listId, VerifyCommand = null });
|
||||
|
||||
var fetched = await _repo.GetConfigAsync(_listId);
|
||||
Assert.NotNull(fetched);
|
||||
Assert.Null(fetched.VerifyCommand);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
_ctx.Dispose();
|
||||
|
||||
Reference in New Issue
Block a user