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 | c10dc9e221317ea39f9ce0f172670ffbe94e6f8a (patch) | |
tree | eebb391b7cf000ec82309f7299ca467ce8af8c49 /Timeline.Tests/Services/TimelineServiceTest.cs | |
parent | 7936281edc1ac592cd318b8dccb37f3c4e7334e8 (diff) | |
download | timeline-c10dc9e221317ea39f9ce0f172670ffbe94e6f8a.tar.gz timeline-c10dc9e221317ea39f9ce0f172670ffbe94e6f8a.tar.bz2 timeline-c10dc9e221317ea39f9ce0f172670ffbe94e6f8a.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);
+ }
+ }
}
}
|