aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-06 23:04:13 +0800
committerGitHub <noreply@github.com>2021-03-06 23:04:13 +0800
commitf7bf0b6609ac21165c8bd5502c0ec2b1a51bf618 (patch)
tree59507331750831118e7caa071a10e1cb8fc1e627 /BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
parent736ba716cfb87bc0e8e4979825a1693dc6010f9c (diff)
parent8f09e3172f249a9f5d229040415a0569e9d1c01b (diff)
downloadtimeline-f7bf0b6609ac21165c8bd5502c0ec2b1a51bf618.tar.gz
timeline-f7bf0b6609ac21165c8bd5502c0ec2b1a51bf618.tar.bz2
timeline-f7bf0b6609ac21165c8bd5502c0ec2b1a51bf618.zip
Merge pull request #347 from crupest/markdown
Markdown post auto translate data url.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs')
-rw-r--r--BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
index 664a0604..c728a280 100644
--- a/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
+++ b/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
@@ -214,7 +214,7 @@ namespace Timeline.Tests.IntegratedTests
{
using var client = await CreateClientAsAdministrator();
{
- var body = await client.TestPostAsync<HttpUser>(createUserUrl, new HttpCreateUserRequest
+ var body = await client.TestPostAsync<HttpUser>(createUserUrl, new HttpUserPostRequest
{
Username = "aaa",
Password = "bbb",
@@ -233,15 +233,15 @@ namespace Timeline.Tests.IntegratedTests
public static IEnumerable<object[]> Op_CreateUser_InvalidModel_Data()
{
- yield return new[] { new HttpCreateUserRequest { Username = "aaa" } };
- yield return new[] { new HttpCreateUserRequest { Password = "bbb" } };
- yield return new[] { new HttpCreateUserRequest { Username = "a!a", Password = "bbb" } };
- yield return new[] { new HttpCreateUserRequest { Username = "aaa", Password = "" } };
+ yield return new[] { new HttpUserPostRequest { Username = "aaa" } };
+ yield return new[] { new HttpUserPostRequest { Password = "bbb" } };
+ yield return new[] { new HttpUserPostRequest { Username = "a!a", Password = "bbb" } };
+ yield return new[] { new HttpUserPostRequest { Username = "aaa", Password = "" } };
}
[Theory]
[MemberData(nameof(Op_CreateUser_InvalidModel_Data))]
- public async Task Op_CreateUser_InvalidModel(HttpCreateUserRequest body)
+ public async Task Op_CreateUser_InvalidModel(HttpUserPostRequest body)
{
using var client = await CreateClientAsAdministrator();
await client.TestPostAssertInvalidModelAsync(createUserUrl, body);
@@ -251,7 +251,7 @@ namespace Timeline.Tests.IntegratedTests
public async Task Op_CreateUser_UsernameConflict()
{
using var client = await CreateClientAsAdministrator();
- await client.TestPostAssertErrorAsync(createUserUrl, new HttpCreateUserRequest
+ await client.TestPostAssertErrorAsync(createUserUrl, new HttpUserPostRequest
{
Username = "user1",
Password = "bbb",
@@ -262,7 +262,7 @@ namespace Timeline.Tests.IntegratedTests
public async Task Op_CreateUser_NoAuth_Unauthorized()
{
using var client = await CreateDefaultClient();
- await client.TestPostAssertUnauthorizedAsync(createUserUrl, new HttpCreateUserRequest
+ await client.TestPostAssertUnauthorizedAsync(createUserUrl, new HttpUserPostRequest
{
Username = "aaa",
Password = "bbb",
@@ -273,7 +273,7 @@ namespace Timeline.Tests.IntegratedTests
public async Task Op_CreateUser_User_Forbid()
{
using var client = await CreateClientAsUser();
- await client.TestPostAssertForbiddenAsync(createUserUrl, new HttpCreateUserRequest
+ await client.TestPostAssertForbiddenAsync(createUserUrl, new HttpUserPostRequest
{
Username = "aaa",
Password = "bbb",