@@ -9,31 +9,31 @@ namespace InertiaCoreTests;
9
9
public partial class Tests
10
10
{
11
11
[ Test ]
12
- [ Description ( "Test SSR dispatch should not dispatch by default when no bundle exists" ) ]
12
+ [ Description ( "Test SSR dispatch should not dispatch by default when no bundle exists and bundle is required " ) ]
13
13
public void TestSsrDispatchDefaultBehaviorWithoutBundle ( )
14
14
{
15
15
var httpClientFactory = new Mock < IHttpClientFactory > ( ) ;
16
16
var environment = new Mock < IWebHostEnvironment > ( ) ;
17
17
environment . SetupGet ( x => x . ContentRootPath ) . Returns ( Path . GetTempPath ( ) ) ;
18
18
19
19
var options = new Mock < IOptions < InertiaOptions > > ( ) ;
20
- options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrDispatchWithoutBundle = false } ) ;
20
+ options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrEnsureBundleExists = true } ) ;
21
21
22
22
var gateway = new Gateway ( httpClientFactory . Object , options . Object , environment . Object ) ;
23
23
24
24
Assert . That ( gateway . ShouldDispatch ( ) , Is . False ) ;
25
25
}
26
26
27
27
[ Test ]
28
- [ Description ( "Test SSR dispatch should dispatch when SsrDispatchWithoutBundle is enabled " ) ]
28
+ [ Description ( "Test SSR dispatch should dispatch when SsrEnsureBundleExists is disabled " ) ]
29
29
public void TestSsrDispatchWithoutBundleEnabled ( )
30
30
{
31
31
var httpClientFactory = new Mock < IHttpClientFactory > ( ) ;
32
32
var environment = new Mock < IWebHostEnvironment > ( ) ;
33
33
environment . SetupGet ( x => x . ContentRootPath ) . Returns ( Path . GetTempPath ( ) ) ;
34
34
35
35
var options = new Mock < IOptions < InertiaOptions > > ( ) ;
36
- options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrDispatchWithoutBundle = true } ) ;
36
+ options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrEnsureBundleExists = false } ) ;
37
37
38
38
var gateway = new Gateway ( httpClientFactory . Object , options . Object , environment . Object ) ;
39
39
@@ -58,7 +58,7 @@ public void TestSsrDispatchWithBundleExists()
58
58
environment . SetupGet ( x => x . ContentRootPath ) . Returns ( tempDir ) ;
59
59
60
60
var options = new Mock < IOptions < InertiaOptions > > ( ) ;
61
- options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrDispatchWithoutBundle = false } ) ;
61
+ options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrEnsureBundleExists = true } ) ;
62
62
63
63
var gateway = new Gateway ( httpClientFactory . Object , options . Object , environment . Object ) ;
64
64
@@ -74,7 +74,7 @@ public void TestSsrDispatchWithBundleExists()
74
74
}
75
75
76
76
[ Test ]
77
- [ Description ( "Test SSR dispatch should dispatch when either bundle exists or dispatch without bundle is enabled " ) ]
77
+ [ Description ( "Test SSR dispatch should dispatch when either bundle exists or SsrEnsureBundleExists is disabled " ) ]
78
78
public void TestSsrDispatchWithBundleAndDispatchWithoutBundleEnabled ( )
79
79
{
80
80
var tempDir = Path . GetTempPath ( ) ;
@@ -91,7 +91,7 @@ public void TestSsrDispatchWithBundleAndDispatchWithoutBundleEnabled()
91
91
environment . SetupGet ( x => x . ContentRootPath ) . Returns ( tempDir ) ;
92
92
93
93
var options = new Mock < IOptions < InertiaOptions > > ( ) ;
94
- options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrDispatchWithoutBundle = true } ) ;
94
+ options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrEnsureBundleExists = false } ) ;
95
95
96
96
var gateway = new Gateway ( httpClientFactory . Object , options . Object , environment . Object ) ;
97
97
@@ -124,7 +124,7 @@ public void TestSsrDispatchChecksMultipleBundlePaths()
124
124
environment . SetupGet ( x => x . ContentRootPath ) . Returns ( tempDir ) ;
125
125
126
126
var options = new Mock < IOptions < InertiaOptions > > ( ) ;
127
- options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrDispatchWithoutBundle = false } ) ;
127
+ options . SetupGet ( x => x . Value ) . Returns ( new InertiaOptions { SsrEnsureBundleExists = true } ) ;
128
128
129
129
var gateway = new Gateway ( httpClientFactory . Object , options . Object , environment . Object ) ;
130
130
0 commit comments