Skip to content

Commit e262ece

Browse files
committed
integration tests mvc view fixed
1 parent 2cb31cc commit e262ece

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/Tests/integrationtests/Tests.Integration.Mvc/Views/Home/AllTypesData.cshtml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@
482482
],
483483
@if (ViewBag.dataSourceApp == "mvc")
484484
{
485-
@: "columnDefs": [
485+
@: "columnDefs": [
486486
@: {
487487
@: "render": function(data, type, row) {
488488
@: if (!row.DateTimeProperty) {
@@ -594,9 +594,15 @@
594594
@:
595595
@: {
596596
@: "render": function(data, type, row) {
597-
@: if (!row.NestedModel) return '';
597+
@: if (!row.NestedModel) return '';
598+
@:
599+
@: var prop = row.NestedModel.DateTimeOffsetProperty;
600+
@:
601+
@: if (!prop) {
602+
@: return "";
603+
@: }
598604
@:
599-
@: var prop = if;
605+
@: date = new Date(parseInt(prop.replace("/Date(", "").replace(")/", ""), 10));
600606
@:
601607
@: return date.toUTCString();
602608
@: },

src/Tests/integrationtests/Tests.Integration.Mvc/Web.config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
<add key="webApi2Url" value=" http://localhost:50178/api" />
2929

30-
<!--<add key="dataSourceApp" value="mvc" />-->
31-
<add key="dataSourceApp" value="webapi2" />
30+
<add key="dataSourceApp" value="mvc" />
31+
<!--<add key="dataSourceApp" value="webapi2" />-->
3232
</appSettings>
3333
<system.web>
3434
<compilation debug="true" targetFramework="4.6.1" />

0 commit comments

Comments
 (0)