aboutsummaryrefslogtreecommitdiff
path: root/Timeline.Tests
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
commit1e86a5c6fbbd6aa05a0a5fcaadf8a9d7b1402eca (patch)
treefb40d254bcec2946ce7c080089c76a342d3472b0 /Timeline.Tests
parent37382ac85675bded43f800fec18fa8eb2ba22706 (diff)
downloadtimeline-1e86a5c6fbbd6aa05a0a5fcaadf8a9d7b1402eca.tar.gz
timeline-1e86a5c6fbbd6aa05a0a5fcaadf8a9d7b1402eca.tar.bz2
timeline-1e86a5c6fbbd6aa05a0a5fcaadf8a9d7b1402eca.zip
Add test for bad enum value of timeline visibility.
Diffstat (limited to 'Timeline.Tests')
-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();