diff options
author | crupest <crupest@outlook.com> | 2020-11-15 20:54:33 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-15 20:54:33 +0800 |
commit | 515430ecc976008c50cf27a38dc869c2b1aa73c0 (patch) | |
tree | 945016b5c2a911a2a19b8f4f1472ecfdbe32a602 /BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs | |
parent | fa7b123be84afe020fc582535cc270e8cf24e85b (diff) | |
parent | 45873d9115840c9db596c2dffebc7bb29df13686 (diff) | |
download | timeline-515430ecc976008c50cf27a38dc869c2b1aa73c0.tar.gz timeline-515430ecc976008c50cf27a38dc869c2b1aa73c0.tar.bz2 timeline-515430ecc976008c50cf27a38dc869c2b1aa73c0.zip |
Merge pull request #188 from crupest/root-user
Forbid some operation on root user.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs')
-rw-r--r-- | BackEnd/Timeline.Tests/IntegratedTests/UserTest.cs | 7 |
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();
|