From 0bb2cc098506963ebf9ee06ec94b43c8d388543c Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 7 Jan 2021 22:10:58 +0800 Subject: feat: Timeline info contains bookmark and highlight flag. --- .../IntegratedTests/HighlightTimelineTest.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'BackEnd/Timeline.Tests/IntegratedTests/HighlightTimelineTest.cs') diff --git a/BackEnd/Timeline.Tests/IntegratedTests/HighlightTimelineTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/HighlightTimelineTest.cs index a3f2855e..440759f4 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests/HighlightTimelineTest.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests/HighlightTimelineTest.cs @@ -86,5 +86,38 @@ namespace Timeline.Tests.IntegratedTests h.Should().BeEmpty(); } } + + [Fact] + public async Task TimelineGet_IsHighlighField_Should_Work() + { + using var client = await CreateClientAsAdministrator(); + await client.TestPostAsync("timelines", new TimelineCreateRequest { Name = "t" }); + + { + var t = await client.TestGetAsync("timelines/t"); + t.IsHighlight.Should().BeFalse(); + } + + await client.TestPutAsync("highlights/t"); + + { + var t = await client.TestGetAsync("timelines/t"); + t.IsHighlight.Should().BeTrue(); + } + + { + var client1 = await CreateDefaultClient(); + var t = await client1.TestGetAsync("timelines/t"); + t.IsHighlight.Should().BeTrue(); + } + + await client.TestDeleteAsync("highlights/t"); + + { + var t = await client.TestGetAsync("timelines/t"); + t.IsHighlight.Should().BeFalse(); + } + + } } } -- cgit v1.2.3