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 <noreply@anthropic.com>
This commit is contained in:
@@ -10,6 +10,7 @@ using PowderCoating.Application.Interfaces;
|
|||||||
using PowderCoating.Core.Entities;
|
using PowderCoating.Core.Entities;
|
||||||
using PowderCoating.Core.Enums;
|
using PowderCoating.Core.Enums;
|
||||||
using PowderCoating.Infrastructure.Data;
|
using PowderCoating.Infrastructure.Data;
|
||||||
|
using PowderCoating.Infrastructure.Repositories;
|
||||||
using PowderCoating.Web.Controllers;
|
using PowderCoating.Web.Controllers;
|
||||||
using PowderCoating.Web.Hubs;
|
using PowderCoating.Web.Hubs;
|
||||||
using PowderCoating.Web.ViewModels;
|
using PowderCoating.Web.ViewModels;
|
||||||
@@ -319,7 +320,7 @@ public class QuoteApprovalControllerTests
|
|||||||
hubContext.SetupGet(x => x.Clients).Returns(hubClients.Object);
|
hubContext.SetupGet(x => x.Clients).Returns(hubClients.Object);
|
||||||
|
|
||||||
var controller = new QuoteApprovalController(
|
var controller = new QuoteApprovalController(
|
||||||
context,
|
new UnitOfWork(context),
|
||||||
notifications.Object,
|
notifications.Object,
|
||||||
inApp.Object,
|
inApp.Object,
|
||||||
Mock.Of<IStripeConnectService>(),
|
Mock.Of<IStripeConnectService>(),
|
||||||
|
|||||||
Reference in New Issue
Block a user