From 955b9e8060b9d77e4c36bdbc29a7523dca5ada11 Mon Sep 17 00:00:00 2001 From: jvyden Date: Wed, 3 Nov 2021 23:53:10 -0400 Subject: [PATCH] Fix Authentication tests --- ProjectLighthouse.Tests/LighthouseTest.cs | 4 +++- ProjectLighthouse.Tests/Tests/AuthenticationTests.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ProjectLighthouse.Tests/LighthouseTest.cs b/ProjectLighthouse.Tests/LighthouseTest.cs index 5f88d8c4..00a7e191 100644 --- a/ProjectLighthouse.Tests/LighthouseTest.cs +++ b/ProjectLighthouse.Tests/LighthouseTest.cs @@ -3,6 +3,7 @@ using System.IO; using System.Net.Http; using System.Threading.Tasks; using System.Xml.Serialization; +using LBPUnion.ProjectLighthouse.Helpers; using LBPUnion.ProjectLighthouse.Serialization; using LBPUnion.ProjectLighthouse.Types; using Microsoft.AspNetCore.Hosting; @@ -29,7 +30,8 @@ namespace LBPUnion.ProjectLighthouse.Tests string stringContent = $"{LoginData.UsernamePrefix}{username}{number}{(char)0x00}"; - HttpResponseMessage response = await this.Client.PostAsync("/LITTLEBIGPLANETPS3_XML/login", new StringContent(stringContent)); + HttpResponseMessage response = await this.Client.PostAsync + ($"/LITTLEBIGPLANETPS3_XML/login?titleID={GameVersionHelper.LittleBigPlanet2TitleIds[0]}", new StringContent(stringContent)); return response; } diff --git a/ProjectLighthouse.Tests/Tests/AuthenticationTests.cs b/ProjectLighthouse.Tests/Tests/AuthenticationTests.cs index 893648e0..a996612b 100644 --- a/ProjectLighthouse.Tests/Tests/AuthenticationTests.cs +++ b/ProjectLighthouse.Tests/Tests/AuthenticationTests.cs @@ -12,7 +12,7 @@ namespace LBPUnion.ProjectLighthouse.Tests [Fact] public async Task ShouldReturnErrorOnNoPostData() { - HttpResponseMessage response = await this.Client.PostAsync("/LITTLEBIGPLANETPS3_XML/login", null!); + HttpResponseMessage response = await this.Client.PostAsync($"/LITTLEBIGPLANETPS3_XML/login", null!); Assert.False(response.IsSuccessStatusCode); #if NET6_0_OR_GREATER Assert.True(response.StatusCode == HttpStatusCode.BadRequest);