aboutsummaryrefslogtreecommitdiff
path: root/tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2023-10-13 10:45:15 +0200
committerGitHub <noreply@github.com>2023-10-13 10:45:15 +0200
commit4fc27fa63eb5a88a1a67a7ba67e969468f79a48d (patch)
tree3275848551b4a2c5a844bdbd2d14f0697637b79e /tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs
parent5277339982f57c6e882db3313ee302667cce2ffb (diff)
parentd7748cfa0476280cce9dba34b4512cc58760c8bb (diff)
Merge pull request #10390 from Bond-009/streams
Diffstat (limited to 'tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs')
-rw-r--r--tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs b/tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs
index 0ade345a1..98195a294 100644
--- a/tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs
+++ b/tests/Jellyfin.Server.Integration.Tests/OpenApiSpecTests.cs
@@ -31,10 +31,10 @@ namespace Jellyfin.Server.Integration.Tests
Assert.Equal("application/json; charset=utf-8", response.Content.Headers.ContentType?.ToString());
// Write out for publishing
- var responseBody = await response.Content.ReadAsStringAsync();
string outputPath = Path.GetFullPath(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ?? ".", "openapi.json"));
_outputHelper.WriteLine("Writing OpenAPI Spec JSON to '{0}'.", outputPath);
- File.WriteAllText(outputPath, responseBody);
+ await using var fs = File.Create(outputPath);
+ await response.Content.CopyToAsync(fs);
}
}
}