aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-04 21:26:01 +0800
committercrupest <crupest@outlook.com>2021-02-04 21:26:01 +0800
commita46460a3cc71497bc7d360ab3d7068059bc7a0cc (patch)
treed1d361e9e5204c06b4356db6d20e7b0adcc39021 /BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs
parentad1e58e80ca5e3eb1e72b93affa82082a3ee861b (diff)
downloadtimeline-a46460a3cc71497bc7d360ab3d7068059bc7a0cc.tar.gz
timeline-a46460a3cc71497bc7d360ab3d7068059bc7a0cc.tar.bz2
timeline-a46460a3cc71497bc7d360ab3d7068059bc7a0cc.zip
...
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs')
-rw-r--r--BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs27
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");
+ }
+ }
}
}