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.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<IStripeConnectService>(),
|
||||
|
||||
Reference in New Issue
Block a user