aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-11-20 20:06:40 +0800
committercrupest <crupest@outlook.com>2019-11-20 20:06:40 +0800
commitc74d95b029caaf4f69977179823ebefb6f88029a (patch)
treefb40d254bcec2946ce7c080089c76a342d3472b0 /Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
parent8e97f5f1ea501afb27fce1c462bb0966d3a100bb (diff)
downloadtimeline-c74d95b029caaf4f69977179823ebefb6f88029a.tar.gz
timeline-c74d95b029caaf4f69977179823ebefb6f88029a.tar.bz2
timeline-c74d95b029caaf4f69977179823ebefb6f88029a.zip
Add test for bad enum value of timeline visibility.
Diffstat (limited to 'Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs')
-rw-r--r--Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs b/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
index 483499fb..c5d0addd 100644
--- a/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
+++ b/Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs
@@ -169,6 +169,12 @@ namespace Timeline.Tests.IntegratedTests
{
const string userUrl = "users/user/timeline/posts";
const string adminUrl = "users/admin/timeline/posts";
+ {
+ using var client = await CreateClientAsUser();
+ var res = await client.PostAsync("users/user/timeline/op/property",
+ new StringContent(@"{""visibility"":""abcdefg""}", System.Text.Encoding.UTF8, System.Net.Mime.MediaTypeNames.Application.Json));
+ res.Should().BeInvalidModel();
+ }
{ // default visibility is registered
{
using var client = await CreateClientWithNoAuth();