test: 增加 Lock Post 方法测试
This commit is contained in:
parent
bbcfc15098
commit
8d1246f45f
|
@ -91,8 +91,19 @@ namespace Bootstrap.Admin.Controllers.SqlServer
|
|||
var content = await r.Content.ReadAsStringAsync();
|
||||
Assert.Contains("系统锁屏", content);
|
||||
|
||||
// relogin
|
||||
await Client.LoginAsync();
|
||||
// 第二次调用 跳转到登录页面
|
||||
r = await Client.GetAsync("Lock");
|
||||
Assert.True(r.IsSuccessStatusCode);
|
||||
content = await r.Content.ReadAsStringAsync();
|
||||
Assert.Contains("登 录", content);
|
||||
|
||||
// 调用Post
|
||||
var data = new MultipartFormDataContent
|
||||
{
|
||||
{ new StringContent("Admin"), "userName" },
|
||||
{ new StringContent("123789"), "password" }
|
||||
};
|
||||
await Client.PostAsync("Lock", data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue