Adding role creation during startup + minor fixes in tests

This commit is contained in:
2025-03-16 22:41:44 +01:00
parent 7f5178883d
commit 18e713153b
48 changed files with 1449 additions and 340 deletions

View File

@@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Infrastructure;
using BasicDotnetTemplate.MainProject.Models.Api.Response;
using BasicDotnetTemplate.MainProject.Models.Settings;
using Microsoft.AspNetCore.Http;
namespace BasicDotnetTemplate.MainProject.Tests;
@@ -29,7 +30,7 @@ public class RootController_Test
if (result != null)
{
var data = (OkResult)result;
Assert.IsTrue(data.StatusCode == 200);
Assert.IsTrue(data.StatusCode == StatusCodes.Status200OK);
}
else
{
@@ -39,7 +40,7 @@ public class RootController_Test
catch (Exception ex)
{
Console.WriteLine(ex.InnerException);
Assert.Fail($"An exception was thrown: {ex.Message}");
Assert.Fail($"An exception was thrown: {ex}");
}
}
}