refactor(jobs): centralize status lifecycle

This commit is contained in:
cesnimda
2026-08-31 11:59:49 +02:00
parent 5f0c0b0549
commit ba7748193b
7 changed files with 92 additions and 107 deletions
@@ -113,21 +113,8 @@ public sealed class JobApplicationsAppliedDateHistoryTests
return job;
}
private static JobApplicationsController CreateController(JobTrackerContext db, string userId)
{
var controller = new JobApplicationsController(db, Mock.Of<ISummarizerService>(), TestHostFactory.CreateUserManager().Object);
controller.ControllerContext = new ControllerContext
{
HttpContext = new DefaultHttpContext
{
User = new ClaimsPrincipal(new ClaimsIdentity(new[]
{
new Claim(ClaimTypes.NameIdentifier, userId)
}, "test"))
}
};
return controller;
}
private static JobApplicationLifecycleController CreateController(JobTrackerContext db, string userId)
=> new(db);
private static JobTrackerContext CreateDb() => TestHostFactory.CreateInMemoryDb();
}