aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
diff options
context:
space:
mode:
author杨宇千 <crupest@outlook.com>2020-02-03 18:38:14 +0800
committerGitHub <noreply@github.com>2020-02-03 18:38:14 +0800
commit97010e98a11ad6fd6c075cee414c30174001fe5d (patch)
tree28ef20f9dfe742008bb934f09b99d1d4719cabaa /Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
parent1c880744293c9f47ff1241109b72c035680251df (diff)
parentbe8cbe2c4ddf2076cc02bcb2feb1a70d30a4bda0 (diff)
downloadtimeline-97010e98a11ad6fd6c075cee414c30174001fe5d.tar.gz
timeline-97010e98a11ad6fd6c075cee414c30174001fe5d.tar.bz2
timeline-97010e98a11ad6fd6c075cee414c30174001fe5d.zip
Merge pull request #57 from crupest/dev
Add normal timeline feature.
Diffstat (limited to 'Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs')
-rw-r--r--Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs b/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
index 81446fd8..7d0a68e8 100644
--- a/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
+++ b/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
@@ -25,7 +25,7 @@ namespace Timeline.Tests.IntegratedTests
using var client = await CreateDefaultClient();
var res = await client.GetAsync("users/user1/timeline");
var body = res.Should().HaveStatusCode(200)
- .And.HaveJsonBody<BaseTimelineInfo>().Which;
+ .And.HaveJsonBody<TimelineInfo>().Which;
body.Owner.Should().BeEquivalentTo(UserInfos[1]);
body.Visibility.Should().Be(TimelineVisibility.Register);
body.Description.Should().Be("");
@@ -109,7 +109,7 @@ namespace Timeline.Tests.IntegratedTests
{
var res = await client.GetAsync("users/user1/timeline");
var body = res.Should().HaveStatusCode(200)
- .And.HaveJsonBody<BaseTimelineInfo>()
+ .And.HaveJsonBody<TimelineInfo>()
.Which.Description.Should().Be(description);
}
@@ -120,21 +120,21 @@ namespace Timeline.Tests.IntegratedTests
var res = await client.PatchAsJsonAsync("users/user1/timeline",
new TimelinePatchRequest { Description = mockDescription });
res.Should().HaveStatusCode(200)
- .And.HaveJsonBody<BaseTimelineInfo>().Which.Description.Should().Be(mockDescription);
+ .And.HaveJsonBody<TimelineInfo>().Which.Description.Should().Be(mockDescription);
await AssertDescription(mockDescription);
}
{
var res = await client.PatchAsJsonAsync("users/user1/timeline",
new TimelinePatchRequest { Description = null });
res.Should().HaveStatusCode(200)
- .And.HaveJsonBody<BaseTimelineInfo>().Which.Description.Should().Be(mockDescription);
+ .And.HaveJsonBody<TimelineInfo>().Which.Description.Should().Be(mockDescription);
await AssertDescription(mockDescription);
}
{
var res = await client.PatchAsJsonAsync("users/user1/timeline",
new TimelinePatchRequest { Description = "" });
res.Should().HaveStatusCode(200)
- .And.HaveJsonBody<BaseTimelineInfo>().Which.Description.Should().Be("");
+ .And.HaveJsonBody<TimelineInfo>().Which.Description.Should().Be("");
await AssertDescription("");
}
}
@@ -149,7 +149,7 @@ namespace Timeline.Tests.IntegratedTests
{
var res = await client.GetAsync(getUrl);
res.Should().HaveStatusCode(200)
- .And.HaveJsonBody<BaseTimelineInfo>()
+ .And.HaveJsonBody<TimelineInfo>()
.Which.Members.Should().NotBeNull().And.BeEquivalentTo(members);
}
@@ -157,7 +157,7 @@ namespace Timeline.Tests.IntegratedTests
{
var res = await client.GetAsync(getUrl);
res.Should().HaveStatusCode(200)
- .And.HaveJsonBody<BaseTimelineInfo>()
+ .And.HaveJsonBody<TimelineInfo>()
.Which.Members.Should().NotBeNull().And.BeEmpty();
}
@@ -165,7 +165,7 @@ namespace Timeline.Tests.IntegratedTests
{
var res = await client.PutAsync("/users/user1/timeline/members/usernotexist", null);
res.Should().HaveStatusCode(400)
- .And.HaveCommonBody(ErrorCodes.TimelineController.MemberPut_NotExist);
+ .And.HaveCommonBody(ErrorCodes.TimelineCommon.MemberPut_NotExist);
}
await AssertEmptyMembers();
{