Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 4 additions & 12 deletions SaveHere/SaveHere.Tests/Integration/Http2IntegrationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,14 @@ public async Task HttpClient_ShouldBeConfiguredForHttp2()
}

[Fact]
public async Task HttpClient_ShouldSupportCompression()
public void HttpClient_ShouldSupportCompression()
{
// Arrange
using var scope = _factory.Services.CreateScope();
var httpClientFactory = scope.ServiceProvider.GetRequiredService<IHttpClientFactory>();
var httpClient = httpClientFactory.CreateClient();

// Create a test server that supports compression
// Arrange - Create a test handler that simulates compression support
var testHandler = new TestHttpMessageHandler();
var testClient = new HttpClient(testHandler);
using var testClient = new HttpClient(testHandler);

// Act & Assert
// The configured client should accept compressed responses
var request = new HttpRequestMessage(HttpMethod.Get, "http://test.com");

// Check if Accept-Encoding headers would be set (this is handled by the handler)
// The test handler is configured to support compression
// In a real scenario, the AutomaticDecompression property handles this
Assert.True(testHandler.SupportsCompression);
}
Expand Down
5 changes: 3 additions & 2 deletions SaveHere/SaveHere.Tests/Services/FileManagerServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ public void RenameItem_WithInvalidName_ReturnsFalse()
Type = "file"
};

// Act
var result = _fileManagerService.RenameItem(fileItem, "invalid<>name.txt");
// Act - Use a filename with path separator which is invalid on all platforms
// (forward slash is a path separator on Linux/macOS, not allowed in filenames)
var result = _fileManagerService.RenameItem(fileItem, "invalid/name.txt");

// Assert
Assert.False(result);
Expand Down
Loading
Loading