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
commitc6a4b88794cb87c25757542ad0642e9df56ddf0f (patch)
tree6cf4581e12f10f4d6b6d17ac95f1c6eb1f819eec /BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs
parent1af0c82144a0f28f86922ecda04b159a553c699e (diff)
downloadtimeline-c6a4b88794cb87c25757542ad0642e9df56ddf0f.tar.gz
timeline-c6a4b88794cb87c25757542ad0642e9df56ddf0f.tar.bz2
timeline-c6a4b88794cb87c25757542ad0642e9df56ddf0f.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");
+ }
+ }
}
}