diff options
author | crupest <crupest@outlook.com> | 2021-02-04 21:26:01 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-04 21:26:01 +0800 |
commit | a46460a3cc71497bc7d360ab3d7068059bc7a0cc (patch) | |
tree | d1d361e9e5204c06b4356db6d20e7b0adcc39021 /BackEnd/Timeline.Tests | |
parent | ad1e58e80ca5e3eb1e72b93affa82082a3ee861b (diff) | |
download | timeline-a46460a3cc71497bc7d360ab3d7068059bc7a0cc.tar.gz timeline-a46460a3cc71497bc7d360ab3d7068059bc7a0cc.tar.bz2 timeline-a46460a3cc71497bc7d360ab3d7068059bc7a0cc.zip |
...
Diffstat (limited to 'BackEnd/Timeline.Tests')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs index ae7afda1..f05ed7af 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs @@ -473,5 +473,32 @@ namespace Timeline.Tests.IntegratedTests }
}
+ [Theory]
+ [MemberData(nameof(TimelineNameGeneratorTestData))]
+ public async Task Color(TimelineNameGenerator generator)
+ {
+ using var client = await CreateClientAsUser();
+
+ HttpTimelinePostCreateRequestContent CreateRequestContent() => new()
+ {
+ Type = "text",
+ Text = "aaa"
+ };
+
+ await client.TestPostAssertInvalidModelAsync($"timelines/{generator(1)}/posts", new HttpTimelinePostCreateRequest
+ {
+ Content = CreateRequestContent(),
+ Color = "#1"
+ });
+
+ {
+ var post = await client.TestPostAsync<HttpTimelinePost>($"timelines/{generator(1)}/posts", new HttpTimelinePostCreateRequest
+ {
+ Content = CreateRequestContent(),
+ Color = "#aabbcc"
+ });
+ post.Color.Should().Be("#aabbcc");
+ }
+ }
}
}
|