Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

Fix test

supporta579e51db3dc
diff --git a/src/Tests/Grand.Web.Common.Tests/App_Data/Settings.cfg b/src/Tests/Grand.Web.Common.Tests/App_Data/Settings.cfg
new file mode 100644
index 000000000..1671dcdb6
--- /dev/null
+++ b/src/Tests/Grand.Web.Common.Tests/App_Data/Settings.cfg
@@ -0,0 +1,4 @@
+{
+ "ConnectionString": "connectionstring",
+ "DbProvider": 0
+}
\ No newline at end of file
diff --git a/src/Tests/Grand.Web.Common.Tests/App_Data/index.txt b/src/Tests/Grand.Web.Common.Tests/App_Data/index.txt
deleted file mode 100644
index 5f282702b..000000000
--- a/src/Tests/Grand.Web.Common.Tests/App_Data/index.txt
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/src/Tests/Grand.Web.Common.Tests/AuthorizeMenuAttributeTests.cs b/src/Tests/Grand.Web.Common.Tests/AuthorizeMenuAttributeTests.cs
index d7c0f51c4..e8440d299 100644
--- a/src/Tests/Grand.Web.Common.Tests/AuthorizeMenuAttributeTests.cs
+++ b/src/Tests/Grand.Web.Common.Tests/AuthorizeMenuAttributeTests.cs
@@ -31,7 +31,6 @@ public class AuthorizeMenuAttributeTests
public void Setup()
{
CommonPath.BaseDirectory = "";
- DataSettingsManager.SaveSettings(new DataSettings { ConnectionString = "connectionstring", DbProvider = DbProvider.MongoDB }).GetAwaiter().GetResult();
var settings = DataSettingsManager.LoadSettings();
_mockPermissionService = new Mock<IPermissionService>();
_mockAdminSiteMapService = new Mock<IAdminSiteMapService>();
diff --git a/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj b/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj
index 23d9798ce..4847e7701 100644
--- a/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj
+++ b/src/Tests/Grand.Web.Common.Tests/Grand.Web.Common.Tests.csproj
@@ -21,5 +21,9 @@
<ProjectReference Include="..\..\Core\Grand.SharedKernel\Grand.SharedKernel.csproj" />
<ProjectReference Include="..\..\Web\Grand.Web.Common\Grand.Web.Common.csproj" />
</ItemGroup>
-
+ <ItemGroup>
+ <None Update="App_Data\Settings.cfg">
+ <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ </None>
+ </ItemGroup>
</Project>