diff options
author | crupest <crupest@outlook.com> | 2021-02-13 21:24:33 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2021-02-13 21:24:33 +0800 |
commit | 50dbdde46eed6f2ff4c9691eea4414c1712af8e5 (patch) | |
tree | aa0ee1272aa3e27462289fce0b2d5466d5049f96 /BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs | |
parent | c8bd19aacf9059f740df4f6fa9890127c20c1f6d (diff) | |
parent | 6a1495dc98f5ae5f89de58ed0ff0b500fc71ff5a (diff) | |
download | timeline-50dbdde46eed6f2ff4c9691eea4414c1712af8e5.tar.gz timeline-50dbdde46eed6f2ff4c9691eea4414c1712af8e5.tar.bz2 timeline-50dbdde46eed6f2ff4c9691eea4414c1712af8e5.zip |
Merge branch 'master' into frontend
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs index c5ff507f..b91de6c2 100644 --- a/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs +++ b/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs @@ -566,5 +566,25 @@ namespace Timeline.Tests.IntegratedTests body.Should().Equal(imageData);
}
}
+
+ [Theory]
+ [MemberData(nameof(TimelineNameGeneratorTestData))]
+ public async Task Post_Editable(TimelineNameGenerator generator)
+ {
+ HttpTimelinePost post;
+
+ {
+ using var client = await CreateClientAsUser();
+ post = await client.TestPostAsync<HttpTimelinePost>($"timelines/{generator(1)}/posts", CreateTextPostRequest("a"));
+
+ post.Editable.Should().BeTrue();
+ }
+
+ {
+ using var client = await CreateClientAs(2);
+ var post2 = await client.TestGetAsync<HttpTimelinePost>($"timelines/{generator(1)}/posts/{post.Id}");
+ post2.Editable.Should().BeFalse();
+ }
+ }
}
}
|