From 46c75e5cb0e720f416362273fb1e9af587922422 Mon Sep 17 00:00:00 2001 From: evan-scales Date: Sun, 14 Apr 2024 17:04:23 -0400 Subject: [PATCH] 491: Update borken tests --- FU.API/FU.API.Tests/AccountServiceTests.cs | 4 ++-- FU.API/FU.API.Tests/PostServiceTests.cs | 6 +++--- FU.API/FU.API.Tests/SearchServiceSearchUsersTests.cs | 6 +++--- FU.API/FU.API.Tests/TestsHelper.cs | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/FU.API/FU.API.Tests/AccountServiceTests.cs b/FU.API/FU.API.Tests/AccountServiceTests.cs index 364d0e44..45bad368 100644 --- a/FU.API/FU.API.Tests/AccountServiceTests.cs +++ b/FU.API/FU.API.Tests/AccountServiceTests.cs @@ -48,7 +48,7 @@ public void Dispose() public async void CreateUser_WithValidCredentials_ReturnsUser() { // Arange - Credentials credentials = new() { Username = "Test", Password = "Test" }; + Credentials credentials = new() { Username = "Test", Password = "Test12345" }; // Act ApplicationUser user = await _accountsService.Register(credentials); @@ -62,7 +62,7 @@ public async void CreateUser_WithValidCredentials_ReturnsUser() public async void ChangeUsername_WithValidUsername_ChangesUsername() { // Arange - Credentials credentials = new() { Username = "Username1", Password = "Test" }; + Credentials credentials = new() { Username = "Username1", Password = "Test12345" }; string newUsername = "Username2"; ApplicationUser user = await _accountsService.Register(credentials); diff --git a/FU.API/FU.API.Tests/PostServiceTests.cs b/FU.API/FU.API.Tests/PostServiceTests.cs index 354dfb6b..7ed2e7dd 100644 --- a/FU.API/FU.API.Tests/PostServiceTests.cs +++ b/FU.API/FU.API.Tests/PostServiceTests.cs @@ -137,7 +137,7 @@ public async void GetPostUsers_WithMultipleUsers_ReturnsCorrectUserCount() // Arrange // Note: CreateTestPostAsync creates one user as part of creating a post Post post = await TestsHelper.CreateTestPostAsync(_dbContext); - var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "pass2", Email = "fake2@email.com" }); + var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "Test12345", Email = "fake2@email.com" }); await _postService.JoinPost(post.Id, user2); // Act @@ -166,7 +166,7 @@ public async void JoinPost_WhenAlreadyMember_ThrowsConflictException() { // Arrange Post post = await TestsHelper.CreateTestPostAsync(_dbContext); - var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "pass2", Email = "fake2@email.com" }); + var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "Test12345", Email = "fake2@email.com" }); await _postService.JoinPost(post.Id, user2); // Act & Assert @@ -180,7 +180,7 @@ public async void LeavePost_WhenMember_LeavesPost() { // Arrange Post post = await TestsHelper.CreateTestPostAsync(_dbContext); - var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "pass2", Email = "fake2@email.com" }); + var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "Test12345", Email = "fake2@email.com" }); await _postService.JoinPost(post.Id, user2); // Act diff --git a/FU.API/FU.API.Tests/SearchServiceSearchUsersTests.cs b/FU.API/FU.API.Tests/SearchServiceSearchUsersTests.cs index 097c1ab8..cf17d472 100644 --- a/FU.API/FU.API.Tests/SearchServiceSearchUsersTests.cs +++ b/FU.API/FU.API.Tests/SearchServiceSearchUsersTests.cs @@ -56,19 +56,19 @@ public async Task Search_WithKeyword_SearchesTitleAndBio() { Username = "User1", Email = "fake1@email.com", - Password = "Pass1" + Password = "Test12345" }); var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "User2", Email = "fake2@email.com", - Password = "Pass2" + Password = "Test12345" }); var user3 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "User3", Email = "fake3@email.com", - Password = "Pass3" + Password = "Test12345" }); await _userService.UpdateUserProfile(new UserProfile() { Bio = "Bio3", Id = user3.UserId }); diff --git a/FU.API/FU.API.Tests/TestsHelper.cs b/FU.API/FU.API.Tests/TestsHelper.cs index 1c46414b..4385f286 100644 --- a/FU.API/FU.API.Tests/TestsHelper.cs +++ b/FU.API/FU.API.Tests/TestsHelper.cs @@ -17,7 +17,7 @@ public static async Task CreateTestGameAsync(AppDbContext dbContext) public static async Task CreateUserAsync(AppDbContext context) { - Credentials credentials = new() { Username = "Test", Password = "Test", Email = "fake@email.com" }; + Credentials credentials = new() { Username = "Test", Password = "Test12345", Email = "fake@email.com" }; return await CreateUserAsync(context, credentials); }