aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/IntegratedTests/UserTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-01-31 22:46:17 +0800
committercrupest <crupest@outlook.com>2020-01-31 22:46:17 +0800
commit69a5cc2a6f3282de4859d7c083bd67dfa17226fb (patch)
treef969a960472bbf828e5d639a8deef65341b52a6a /Timeline.Tests/IntegratedTests/UserTest.cs
parent3749a642306b19c84f324b0e94c4d62d8ec60332 (diff)
downloadtimeline-69a5cc2a6f3282de4859d7c083bd67dfa17226fb.tar.gz
timeline-69a5cc2a6f3282de4859d7c083bd67dfa17226fb.tar.bz2
timeline-69a5cc2a6f3282de4859d7c083bd67dfa17226fb.zip
Make all patch return the new entity.
Diffstat (limited to 'Timeline.Tests/IntegratedTests/UserTest.cs')
-rw-r--r--Timeline.Tests/IntegratedTests/UserTest.cs10
1 files changed, 8 insertions, 2 deletions
diff --git a/Timeline.Tests/IntegratedTests/UserTest.cs b/Timeline.Tests/IntegratedTests/UserTest.cs
index f863eb6c..8ce76299 100644
--- a/Timeline.Tests/IntegratedTests/UserTest.cs
+++ b/Timeline.Tests/IntegratedTests/UserTest.cs
@@ -102,7 +102,9 @@ namespace Timeline.Tests.IntegratedTests
{
var res = await client.PatchAsJsonAsync("/users/user1",
new UserPatchRequest { Nickname = "aaa" });
- res.Should().HaveStatusCode(200);
+ res.Should().HaveStatusCode(200)
+ .And.HaveJsonBody<UserInfo>()
+ .Which.Nickname.Should().Be("aaa");
}
{
@@ -128,7 +130,11 @@ namespace Timeline.Tests.IntegratedTests
Administrator = true,
Nickname = "aaa"
});
- res.Should().HaveStatusCode(200);
+ var body = res.Should().HaveStatusCode(200)
+ .And.HaveJsonBody<UserInfo>()
+ .Which;
+ body.Administrator.Should().Be(true);
+ body.Nickname.Should().Be("aaa");
}
{