diff options
author | crupest <crupest@outlook.com> | 2021-06-01 23:22:47 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-06-01 23:22:47 +0800 |
commit | 7e709bf5bc514eda87f9ea87b703d1f6cbb3662a (patch) | |
tree | 718ad2cc37a66a65c564dbfcc71b218e93ad33d2 /BackEnd/Timeline.Tests/IntegratedTests | |
parent | 5ead84a292481b43f44ae3d044193901045ce092 (diff) | |
download | timeline-7e709bf5bc514eda87f9ea87b703d1f6cbb3662a.tar.gz timeline-7e709bf5bc514eda87f9ea87b703d1f6cbb3662a.tar.bz2 timeline-7e709bf5bc514eda87f9ea87b703d1f6cbb3662a.zip |
feat: Add ways to reset timeline or post color.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs index bbfe4ab3..d7832b60 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests/TimelineTest.cs @@ -438,5 +438,17 @@ namespace Timeline.Tests.IntegratedTests timeline.Postable.Should().Be(false);
}
}
+
+ [Theory]
+ [InlineData("")]
+ [InlineData("default")]
+ public async Task Patch_Timeline_Color_Default(string value)
+ {
+ using var client = await CreateClientAsUser();
+ var timeline = await client.TestPatchAsync<HttpTimeline>("timelines/t1", new HttpTimelinePatchRequest { Color = "#111111" });
+ timeline.Color.Should().NotBeNull();
+ var timeline2 = await client.TestPatchAsync<HttpTimeline>("timelines/t1", new HttpTimelinePatchRequest { Color = value });
+ timeline2.Color.Should().BeNull();
+ }
}
}
|