Skip to content

Commit

Permalink
revert debug changes
Browse files Browse the repository at this point in the history
  • Loading branch information
juuwel committed Apr 25, 2024
1 parent 50d0326 commit fae8f5c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
1 change: 0 additions & 1 deletion Tests/AuthTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public class AuthTests : TestBase
public async Task RegisterLogInLogOut()
{
var ws = await new WebSocketTestClient().ConnectAsync();
ws.Client.MessageReceived.Subscribe(m => Console.WriteLine(m.Text));

var registerUserDto = GenerateRandomRegisterUserDto();
await ws.DoAndAssert(new ClientWantsToSignUpDto { RegisterUserDto = registerUserDto }, receivedMessages =>
Expand Down
4 changes: 1 addition & 3 deletions Tests/PlantTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public async Task CreatePlant()

await webSocketTestClient.DoAndAssert(new ClientWantsToCreatePlantDto { CreatePlantDto = createPlantDto, Jwt = jwt }, receivedMessages =>
{
receivedMessages.ForEach(e => Console.WriteLine(e.eventType));
return receivedMessages.Count(e => e.eventType == nameof(ServerSendsPlant)) == 1;
});

Expand All @@ -33,7 +32,6 @@ await webSocketTestClient.DoAndAssert(new ClientWantsAllPlantsDto
PageSize = 10
}, receivedMessages =>
{
receivedMessages.ForEach(e => Console.WriteLine(e.eventType));
return receivedMessages.Count(e => e.eventType == nameof(ServerSendsAllPlants)) == 1;
});
}
Expand All @@ -45,7 +43,7 @@ private CreatePlantDto GenerateRandomCreatePlantDto(string email)
UserEmail = email,
CollectionId = null,
Nickname = "Nickname",
ImageUrl = "https://www.google.com",
ImageUrl = "https://realurl.com",
CreateRequirementsDto = new CreateRequirementsDto
{
SoilMoisture = RequirementLevel.Low,
Expand Down
1 change: 0 additions & 1 deletion Tests/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ await webSocketTestClient.DoAndAssert(new ClientWantsToSignUpDto { RegisterUserD

var jwtSubscription = webSocketTestClient.Client.MessageReceived.Subscribe(msg =>
{
Console.WriteLine(msg.Text);
var serverAuthenticates = JsonSerializer.Deserialize<ServerAuthenticatesUser>(msg.Text, options: new JsonSerializerOptions { PropertyNameCaseInsensitive = true });
jwt = serverAuthenticates.Jwt;
});
Expand Down
3 changes: 1 addition & 2 deletions api/GlobalExceptionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public static void Handle(this Exception ex, IWebSocketConnection socket, string
else
serverResponse = new ServerSendsErrorMessage
{
// TODO: revert Error = "Something went wrong. Please try again later."
Error = ex.Message
Error = "Something went wrong. Please try again later."
};

socket.SendDto(serverResponse);
Expand Down

0 comments on commit fae8f5c

Please sign in to comment.