From 1e86a5c6fbbd6aa05a0a5fcaadf8a9d7b1402eca Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 20 Nov 2019 20:06:40 +0800 Subject: Add test for bad enum value of timeline visibility. --- Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'Timeline.Tests/IntegratedTests/PersonalTimelineTest.cs') 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(); -- cgit v1.2.3