Commit ae853a96 authored by Marcel Nellesen's avatar Marcel Nellesen
Browse files

Fix: Fixed tests

parent 97ef4704
......@@ -230,7 +230,7 @@ namespace Coscine.Api.Project.Tests
JWTHandler jwtHandler = new JWTHandler(Program.Configuration);
Dictionary<string, string> values = new Dictionary<string, string>
{
{ "UserId", user.Id.ToString() }
{ "userId", user.Id.ToString() }
};
var additionalProtocol = Program.Configuration.GetStringAndWait("coscine/local/sharepoint/additional/protocol");
......@@ -276,9 +276,14 @@ namespace Coscine.Api.Project.Tests
context.SetupGet(x => x.Request).Returns(request.Object);
var claimsPrincipal = new Mock<ClaimsPrincipal>();
Claim claim = new Claim("UserID", user.Id.ToString());
Claim claim = new Claim("userId", user.Id.ToString());
var list = new List<Claim>
{
claim
};
context.SetupGet(x => x.User).Returns(claimsPrincipal.Object);
context.Setup(x => x.User.FindFirst("UserID")).Returns(claim);
context.Setup(x => x.User.FindFirst("userId")).Returns(claim);
context.SetupGet(x => x.User.Claims).Returns(list);
if (stream != null)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment