aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-15 20:48:28 +0800
committercrupest <crupest@outlook.com>2020-11-15 20:48:28 +0800
commit45873d9115840c9db596c2dffebc7bb29df13686 (patch)
tree945016b5c2a911a2a19b8f4f1472ecfdbe32a602 /BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
parent5b7b0120406ef4c609c07ab57074a76a753cd1fd (diff)
downloadtimeline-45873d9115840c9db596c2dffebc7bb29df13686.tar.gz
timeline-45873d9115840c9db596c2dffebc7bb29df13686.tar.bz2
timeline-45873d9115840c9db596c2dffebc7bb29df13686.zip
feat: Deleting root user now returns 400.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs')
-rw-r--r--BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
index 0c2e0b0d..55a37198 100644
--- a/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
+++ b/BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs
@@ -176,6 +176,13 @@ namespace Timeline.Tests.IntegratedTests
}
[Fact]
+ public async Task DeleteRootUser_Should_Error()
+ {
+ using var client = await CreateClientAsAdministrator();
+ await client.TestDeleteAssertErrorAsync("users/admin", errorCode: ErrorCodes.UserController.Delete_RootUser);
+ }
+
+ [Fact]
public async Task Delete_InvalidModel()
{
using var client = await CreateClientAsAdministrator();