-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ff35d87
commit 46c75e5
Showing
4 changed files
with
9 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 = "[email protected]" }); | ||
var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "Test12345", Email = "[email protected]" }); | ||
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 = "[email protected]" }); | ||
var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "Test12345", Email = "[email protected]" }); | ||
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 = "[email protected]" }); | ||
var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() { Username = "user2", Password = "Test12345", Email = "[email protected]" }); | ||
await _postService.JoinPost(post.Id, user2); | ||
|
||
// Act | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,19 +56,19 @@ public async Task Search_WithKeyword_SearchesTitleAndBio() | |
{ | ||
Username = "User1", | ||
Email = "[email protected]", | ||
Password = "Pass1" | ||
Password = "Test12345" | ||
}); | ||
var user2 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() | ||
{ | ||
Username = "User2", | ||
Email = "[email protected]", | ||
Password = "Pass2" | ||
Password = "Test12345" | ||
}); | ||
var user3 = await TestsHelper.CreateUserAsync(_dbContext, new Credentials() | ||
{ | ||
Username = "User3", | ||
Email = "[email protected]", | ||
Password = "Pass3" | ||
Password = "Test12345" | ||
}); | ||
await _userService.UpdateUserProfile(new UserProfile() { Bio = "Bio3", Id = user3.UserId }); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ public static async Task<Game> CreateTestGameAsync(AppDbContext dbContext) | |
|
||
public static async Task<ApplicationUser> CreateUserAsync(AppDbContext context) | ||
{ | ||
Credentials credentials = new() { Username = "Test", Password = "Test", Email = "[email protected]" }; | ||
Credentials credentials = new() { Username = "Test", Password = "Test12345", Email = "[email protected]" }; | ||
return await CreateUserAsync(context, credentials); | ||
} | ||
|
||
|