aboutsummaryrefslogtreecommitdiff
path: root/BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-13 16:20:45 +0800
committerGitHub <noreply@github.com>2020-11-13 16:20:45 +0800
commit381cb7c64123c71899f549baa16bb610cc8b037f (patch)
treedfb4dd690704e887e3609265e6a652fe7ccea218 /BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs
parent5b78017e93450342c85a0e7f5ed16bbb6ae8422e (diff)
parentb635b4453756d9a33c173c9b9f2ae0ab7c830d3b (diff)
downloadtimeline-381cb7c64123c71899f549baa16bb610cc8b037f.tar.gz
timeline-381cb7c64123c71899f549baa16bb610cc8b037f.tar.bz2
timeline-381cb7c64123c71899f549baa16bb610cc8b037f.zip
Merge pull request #183 from crupest/auth
Refactor auth module to enable more flexiable permission control.
Diffstat (limited to 'BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs')
-rw-r--r--BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs b/BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs
index 480d66cd..9aac8188 100644
--- a/BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs
+++ b/BackEnd/Timeline.Tests/IntegratedTests/TokenTest.cs
@@ -3,7 +3,6 @@ using Microsoft.Extensions.DependencyInjection;
using System.Collections.Generic;
using System.Net.Http;
using System.Threading.Tasks;
-using Timeline.Models;
using Timeline.Models.Http;
using Timeline.Services;
using Timeline.Tests.Helpers;
@@ -103,7 +102,8 @@ namespace Timeline.Tests.IntegratedTests
{
// create a user for test
var userService = scope.ServiceProvider.GetRequiredService<IUserService>();
- await userService.ModifyUser("user1", new User { Password = "user1pw" });
+ var id = await userService.GetUserIdByUsername("user1");
+ await userService.ModifyUser(id, new ModifyUserParams { Password = "user1pw" });
}
(await client.PostAsJsonAsync(VerifyTokenUrl,