From 4d27a378ac0d2a1325b168074fbe330ff01a4753 Mon Sep 17 00:00:00 2001 From: Scott Pouliot Date: Tue, 28 Apr 2026 09:35:30 -0400 Subject: [PATCH] Fix QuoteApprovalControllerTests build break after Phase 3 migration QuoteApprovalController's constructor changed from ApplicationDbContext to IUnitOfWork in Phase 3, but the test helper was still passing the raw context. Wrap context in UnitOfWork in CreateController; tests seed/assert through context directly so the same instance works correctly. Co-Authored-By: Claude Sonnet 4.6 --- tests/PowderCoating.UnitTests/QuoteApprovalControllerTests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/PowderCoating.UnitTests/QuoteApprovalControllerTests.cs b/tests/PowderCoating.UnitTests/QuoteApprovalControllerTests.cs index e26b790..c78e418 100644 --- a/tests/PowderCoating.UnitTests/QuoteApprovalControllerTests.cs +++ b/tests/PowderCoating.UnitTests/QuoteApprovalControllerTests.cs @@ -10,6 +10,7 @@ using PowderCoating.Application.Interfaces; using PowderCoating.Core.Entities; using PowderCoating.Core.Enums; using PowderCoating.Infrastructure.Data; +using PowderCoating.Infrastructure.Repositories; using PowderCoating.Web.Controllers; using PowderCoating.Web.Hubs; using PowderCoating.Web.ViewModels; @@ -319,7 +320,7 @@ public class QuoteApprovalControllerTests hubContext.SetupGet(x => x.Clients).Returns(hubClients.Object); var controller = new QuoteApprovalController( - context, + new UnitOfWork(context), notifications.Object, inApp.Object, Mock.Of(),