diff --git a/.gitignore b/.gitignore index 7c40483d0..099ed5fc5 100644 --- a/.gitignore +++ b/.gitignore @@ -228,4 +228,5 @@ ModelManifest.xml /samples/EPiServer.Templates.Alloy.Mvc/App_Code/** /nupkgs modules -zipoutput \ No newline at end of file +zipoutput +/samples/QuickSilver/EPiServer.Reference.Commerce.Site/App_Data/** \ No newline at end of file diff --git a/samples/QuickSilver/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj b/samples/QuickSilver/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj index 92a3f9aa7..331b2832d 100644 --- a/samples/QuickSilver/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj +++ b/samples/QuickSilver/EPiServer.Reference.Commerce.Site/EPiServer.Reference.Commerce.Site.csproj @@ -1,5 +1,5 @@ - + net6.0 true @@ -13,8 +13,8 @@ - - + + diff --git a/src/EPiServer.Marketing.Testing.Web/Controllers/KpiStore.cs b/src/EPiServer.Marketing.Testing.Web/Controllers/KpiStore.cs index 0b364d2c1..95918e56a 100644 --- a/src/EPiServer.Marketing.Testing.Web/Controllers/KpiStore.cs +++ b/src/EPiServer.Marketing.Testing.Web/Controllers/KpiStore.cs @@ -49,8 +49,8 @@ public RestResult Get() /// /// /// - [HttpPut] - public ActionResult Put([FromBody]KpiPutRequest request) + [HttpPost] + public ActionResult Post([FromBody]KpiPutRequest request) { List validKpiInstances = new List(); Dictionary kpiErrors = new Dictionary(); diff --git a/test/EPiServer.Marketing.Testing.Test/Web/KpiStoreTests.cs b/test/EPiServer.Marketing.Testing.Test/Web/KpiStoreTests.cs index 2e1b4696a..875ae557c 100644 --- a/test/EPiServer.Marketing.Testing.Test/Web/KpiStoreTests.cs +++ b/test/EPiServer.Marketing.Testing.Test/Web/KpiStoreTests.cs @@ -62,7 +62,7 @@ public void Put_With_Null_Entity() { var testClass = GetUnitUnderTest(); var request = new KpiPutRequest { entity = "", id = "" }; - var retResult = testClass.Put(request) as RestResult; + var retResult = testClass.Post(request) as RestResult; var responseDataStatus = (bool)retResult.Data.GetType().GetProperty("status").GetValue(retResult.Data, null); @@ -78,7 +78,7 @@ public void Put_With_Non_Null_Entity_Throws_Exception() entity = "{\"kpiType\": \"EPiServer.Marketing.KPI.Common.ContentComparatorKPI, EPiServer.Marketing.KPI, Version=2.0.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7\",\"ConversionPage\": \"16\",\"CurrentContent\": \"6_197\"}", id = "" }; - var retResult = testClass.Put(request) as RestResult; + var retResult = testClass.Post(request) as RestResult; var responseDataStatus = (bool)retResult.Data.GetType().GetProperty("status").GetValue(retResult.Data, null); @@ -113,7 +113,7 @@ public void Put_Returns_Correct_Weight_For_Each_Kpi() _kpiWebRepoMock.Setup(call => call.ActivateKpiInstance(It.IsAny>())).Returns(sticky.Object); var request = new KpiPutRequest { entity = "", id = "KpiFormData" }; - var retResult = testClass.Put(request) as RestResult; + var retResult = testClass.Post(request) as RestResult; var responseDataObj= (Dictionary)retResult.Data.GetType().GetProperty("obj").GetValue(retResult.Data, null); @@ -149,7 +149,7 @@ public void Put_With_Duplicate_Kpis_and_Values_Returns_Proper_Errors() _kpiWebRepoMock.Setup(call => call.ActivateKpiInstance(It.IsAny>())).Returns(sticky.Object); var request = new KpiPutRequest { entity = "", id = "KpiFormData" }; - var retResult = testClass.Put(request) as RestResult; + var retResult = testClass.Post(request) as RestResult; var responseDataErrors = JsonConvert.DeserializeObject>(retResult.Data.GetType().GetProperty("errors").GetValue(retResult.Data, null).ToString());