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();
|
var content = await r.Content.ReadAsStringAsync();
|
||||||
Assert.Contains("系统锁屏", content);
|
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