Skip to content

Commit 82d4186

Browse files
authored
test(Ajax): update ToJson default value to true (#5459)
* test: 增加单元测试 * chore: bump version 9.4.1
1 parent 035e7ac commit 82d4186

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/BootstrapBlazor/BootstrapBlazor.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Razor">
22

33
<PropertyGroup>
4-
<Version>9.4.1-beta01</Version>
4+
<Version>9.4.1</Version>
55
</PropertyGroup>
66

77
<ItemGroup>

test/UnitTest/Components/AjaxTest.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ public async Task Ajax_Test()
1414
{
1515
Url = "/api/Login",
1616
Method = "POST",
17-
Data = new { UserName = "admin", Password = "1234567" },
18-
ToJson = false
17+
Data = new { UserName = "admin", Password = "1234567" }
1918
};
2019
Assert.Equal("/api/Login", option.Url);
2120
Assert.Equal("POST", option.Method);
22-
Assert.False(option.ToJson);
21+
Assert.True(option.ToJson);
2322
Assert.NotNull(option.Data);
2423

24+
option.ToJson = false;
25+
Assert.False(option.ToJson);
26+
2527
var service = Context.Services.GetRequiredService<AjaxService>();
2628
await service.InvokeAsync(option);
2729
}

0 commit comments

Comments
 (0)