From 78bb466b169a58cdc078a01fed5e3c133348b122 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Nov 2026 20:11:55 +0000 Subject: [PATCH 1/2] Initial plan From 9fbcc2775df31dd1c1205cd19c8344de65a3d620 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 2 Nov 2026 20:15:22 +0000 Subject: [PATCH 2/2] Apply remaining changes Co-authored-by: KrzysztofPajak <16772986+KrzysztofPajak@users.noreply.github.com> --- .../Controllers/LoginControllerTwoFactorTests.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Tests/Grand.Web.Admin.Tests/Controllers/LoginControllerTwoFactorTests.cs b/src/Tests/Grand.Web.Admin.Tests/Controllers/LoginControllerTwoFactorTests.cs index d86e11308..298731a41 100644 --- a/src/Tests/Grand.Web.Admin.Tests/Controllers/LoginControllerTwoFactorTests.cs +++ b/src/Tests/Grand.Web.Admin.Tests/Controllers/LoginControllerTwoFactorTests.cs @@ -10,6 +10,8 @@ using Grand.Mediator; using Grand.Web.Admin.Controllers; using Grand.Web.AdminShared.Models.Common; +using Grand.Web.Common.Localization; +using Grand.Web.Common.Security.Authentication; using Microsoft.AspNetCore.Http; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Routing; @@ -55,11 +57,11 @@ public void Setup() TwoFactorAuthenticationEnabled = true, TwoFactorAuthenticationType = TwoFactorAuthenticationType.AppVerification }; - var translations = new Mock(); + var translations = new Mock(); translations.Setup(x => x.GetResource(It.IsAny())).Returns(key => key); _controller = new LoginController(settings, new CaptchaSettings(), translations.Object, - _manager.Object, customers.Object, _authentication.Object, new Mock().Object, - new Mock().Object, new Mock().Object); + _manager.Object, customers.Object, _authentication.Object, new Mock().Object, + new Mock { DefaultValue = DefaultValue.Mock }.Object, new Mock().Object); _session = new TestSession(); _controller.ControllerContext = new ControllerContext { HttpContext = new DefaultHttpContext { Session = _session },