Skip to content

Commit 909adcc

Browse files
committed
Cleanup tests
1 parent 91efaa9 commit 909adcc

File tree

5 files changed

+3
-12
lines changed

5 files changed

+3
-12
lines changed

InertiaCoreTests/Setup.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using InertiaCore;
2-
using InertiaCore.Extensions;
32
using InertiaCore.Models;
43
using InertiaCore.Ssr;
54
using InertiaCore.Utils;
@@ -31,7 +30,7 @@ public void Setup()
3130
}
3231

3332
/// <summary>
34-
/// Prepares ActionContext for usage in tests.
33+
/// Prepares ActionContext for usage in tests.
3534
/// </summary>
3635
/// <param name="headers">Optional request headers.</param>
3736
/// <param name="sharedData">Optional Inertia shared data.</param>
@@ -57,11 +56,7 @@ private static ActionContext PrepareContext(HeaderDictionary? headers = null, In
5756
var context = new ActionContext(httpContext.Object, new RouteData(), new ActionDescriptor());
5857

5958
if (modelState == null) return context;
60-
61-
foreach (var (key, value) in modelState)
62-
{
63-
context.ModelState.AddModelError(key, value);
64-
}
59+
foreach (var (key, value) in modelState) context.ModelState.AddModelError(key, value);
6560

6661
return context;
6762
}

InertiaCoreTests/UnitTestModelState.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using InertiaCore;
21
using InertiaCore.Models;
32

43
namespace InertiaCoreTests;

InertiaCoreTests/UnitTestPartialData.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using InertiaCore;
21
using InertiaCore.Models;
32
using Microsoft.AspNetCore.Http;
43

InertiaCoreTests/UnitTestResult.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using InertiaCore;
21
using InertiaCore.Models;
32
using Microsoft.AspNetCore.Http;
43
using Microsoft.AspNetCore.Mvc;
@@ -18,7 +17,7 @@ public void TestJsonResult()
1817

1918
var headers = new HeaderDictionary
2019
{
21-
{ "X-Inertia", "true" },
20+
{ "X-Inertia", "true" }
2221
};
2322

2423
var context = PrepareContext(headers);

InertiaCoreTests/UnitTestSharedData.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using InertiaCore;
21
using InertiaCore.Models;
32
using InertiaCore.Utils;
43

0 commit comments

Comments
 (0)