diff options
author | crupest <crupest@outlook.com> | 2020-08-27 23:20:14 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-08-27 23:20:14 +0800 |
commit | bdff6f0ad414f1ec1352d1d4e36c78e06e02ab80 (patch) | |
tree | f6f0248b7ecc3aca7b06a6e5e01877d9d89e3726 /Timeline.Tests/Services/TimelineServiceTest.cs | |
parent | 35f6584f47676353733f1cc9182d84ed4ded5cbc (diff) | |
download | timeline-bdff6f0ad414f1ec1352d1d4e36c78e06e02ab80.tar.gz timeline-bdff6f0ad414f1ec1352d1d4e36c78e06e02ab80.tar.bz2 timeline-bdff6f0ad414f1ec1352d1d4e36c78e06e02ab80.zip |
Timeline service add change timeline name api.
Diffstat (limited to 'Timeline.Tests/Services/TimelineServiceTest.cs')
-rw-r--r-- | Timeline.Tests/Services/TimelineServiceTest.cs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Timeline.Tests/Services/TimelineServiceTest.cs b/Timeline.Tests/Services/TimelineServiceTest.cs index 558ec597..3883cda9 100644 --- a/Timeline.Tests/Services/TimelineServiceTest.cs +++ b/Timeline.Tests/Services/TimelineServiceTest.cs @@ -298,5 +298,24 @@ namespace Timeline.Tests.Services timeline.Title.Should().Be("atitle");
}
}
+
+ [Fact]
+ public async Task ChangeName()
+ {
+ _clock.ForwardCurrentTime();
+
+ await _timelineService.CreateTimeline("tl", await _userService.GetUserIdByUsername("user"));
+
+ var time = _clock.ForwardCurrentTime();
+
+ await _timelineService.ChangeTimelineName("tl", "newtl");
+
+ {
+ var timeline = await _timelineService.GetTimeline("newtl");
+ timeline.Name.Should().Be("newtl");
+ timeline.LastModified.Should().Be(time);
+ timeline.NameLastModified.Should().Be(time);
+ }
+ }
}
}
|