aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-02-13 21:24:33 +0800
committercrupest <crupest@outlook.com>2021-02-13 21:24:33 +0800
commita39b1d690632f336ac5d73186200e393ff241ac0 (patch)
tree3c14af38ec31aa6d2990b9d4444c436ad1f3fdd6 /BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs
parentfe5128137f530daf8ca315cb89811121c6c2c9da (diff)
parent42034bfb60c03b30dec6ddc93d35ced29070b0e7 (diff)
downloadtimeline-a39b1d690632f336ac5d73186200e393ff241ac0.tar.gz
timeline-a39b1d690632f336ac5d73186200e393ff241ac0.tar.bz2
timeline-a39b1d690632f336ac5d73186200e393ff241ac0.zip
Merge branch 'master' into frontend
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs')
-rw-r--r--BackEnd/Timeline.Tests/IntegratedTests/TimelinePostTest.cs20
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();
+ }
+ }
}
}