diff options
author | crupest <crupest@outlook.com> | 2021-04-30 16:52:55 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-04-30 16:52:55 +0800 |
commit | a672e10faad434899d81ef9d0d0d5adbbc7841da (patch) | |
tree | 33c18e4bdad7384c748cf08be1f0569f9a8af619 /BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs | |
parent | b87abbb8ed0aa86a808b2f97e4d22b0ee1addd9f (diff) | |
download | timeline-a672e10faad434899d81ef9d0d0d5adbbc7841da.tar.gz timeline-a672e10faad434899d81ef9d0d0d5adbbc7841da.tar.bz2 timeline-a672e10faad434899d81ef9d0d0d5adbbc7841da.zip |
refactor: ...
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs index e2ce8875..0e7bb735 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs @@ -188,7 +188,7 @@ namespace Timeline.Tests.IntegratedTests body.Should().BeEquivalentTo(await client.GetTimelineAsync("aaa"));
}
- await client.TestPostAssertErrorAsync("timelines", new HttpTimelineCreateRequest { Name = "aaa" }, errorCode: ErrorCodes.TimelineController.NameConflict);
+ await client.TestPostAssertErrorAsync("timelines", new HttpTimelineCreateRequest { Name = "aaa" }, errorCode: ErrorCodes.Conflict.Timeline);
}
}
@@ -210,7 +210,7 @@ namespace Timeline.Tests.IntegratedTests await client.TestDeleteAssertInvalidModelAsync("timelines/!!!");
await client.TestDeleteAsync("timelines/t2");
- await client.TestDeleteAssertErrorAsync("timelines/t2");
+ await client.TestDeleteAsync("timelines/t2");
}
{
@@ -218,7 +218,7 @@ namespace Timeline.Tests.IntegratedTests await client.TestDeleteAssertInvalidModelAsync("timelines/!!!");
await client.TestDeleteAsync("timelines/t1");
- await client.TestDeleteAssertErrorAsync("timelines/t1");
+ await client.TestDeleteAsync("timelines/t1");
}
}
@@ -294,13 +294,13 @@ namespace Timeline.Tests.IntegratedTests }
await AssertEmptyMembers();
- await client.TestPutAssertErrorAsync($"timelines/{timelineName}/members/usernotexist", errorCode: ErrorCodes.UserCommon.NotExist);
+ await client.TestPutAssertErrorAsync($"timelines/{timelineName}/members/usernotexist", errorCode: ErrorCodes.NotExist.User);
await AssertEmptyMembers();
await client.PutTimelineMemberAsync(timelineName, "user2");
await AssertMembers(new List<HttpUser> { await client.GetUserAsync("user2") });
await client.DeleteTimelineMemberAsync(timelineName, "user2", true);
await AssertEmptyMembers();
- await client.TestDeleteAssertErrorAsync($"timelines/{timelineName}/members/usernotexist", errorCode: ErrorCodes.UserCommon.NotExist);
+ await client.TestDeleteAsync($"timelines/{timelineName}/members/usernotexist", false);
await AssertEmptyMembers();
}
@@ -377,7 +377,7 @@ namespace Timeline.Tests.IntegratedTests using (var client = await CreateClientAsUser())
{
await client.TestPatchAssertInvalidModelAsync("timelines/t1", new HttpTimelinePatchRequest { Name = "!!!" });
- await client.TestPatchAssertErrorAsync("timelines/t1", new HttpTimelinePatchRequest { Name = "t2" }, errorCode: ErrorCodes.TimelineController.NameConflict);
+ await client.TestPatchAssertErrorAsync("timelines/t1", new HttpTimelinePatchRequest { Name = "t2" }, errorCode: ErrorCodes.Conflict.Timeline);
await client.TestPatchAsync("timelines/t1", new HttpTimelinePatchRequest { Name = "newt" });
|