Files
Heimdall/tests/Heimdall.Web.Tests/PlaceholderTest.cs
T
Arnaud Dartois ba968a5f23 fix(security): harden Docker, CSRF, EventsHub scoping, secret logging, tests
- Docker: remove default passwords from prod compose (required env vars)
- CSRF: validate antiforgery tokens on /_auth/signin and /_auth/signout
- EventsHub: broadcast to site-scoped Group() instead of Clients.All
- SettingsController: redact secret values in logs
- Create SetAgentSettingValidator + UpdateAppSettingValidator classes
- Replace 3 placeholder test projects with meaningful tests
- Remove FluentValidation auto-validation (incompatible with .NET 10)
2026-07-19 20:53:48 +00:00

36 lines
1.1 KiB
C#

using Microsoft.Extensions.DependencyInjection;
using MudBlazor;
using MudBlazor.Services;
namespace Heimdall.Web.Tests;
public class MudBlazorServicesTests
{
[Fact]
public void AddMudServices_ConfiguresServiceCollection()
{
var services = new ServiceCollection();
services.AddMudServices(config =>
{
config.SnackbarConfiguration.PositionClass = "mud-alert-center-top";
config.SnackbarConfiguration.PreventDuplicates = true;
config.SnackbarConfiguration.VisibleStateDuration = 4000;
});
// Verify services were added by checking that ISnackbar is registered
var descriptor = services.FirstOrDefault(s => s.ServiceType == typeof(ISnackbar));
Assert.NotNull(descriptor);
Assert.Equal(ServiceLifetime.Scoped, descriptor.Lifetime);
}
[Fact]
public void AddMudServices_RegistersDialogService()
{
var services = new ServiceCollection();
services.AddMudServices();
var descriptor = services.FirstOrDefault(s => s.ServiceType == typeof(IDialogService));
Assert.NotNull(descriptor);
}
}