Skip to content

Commit

Permalink
Fix SPA hosting unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-lerch committed Jun 26, 2024
1 parent 24b1c08 commit ca1840e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/Korga.Tests/Http/VueSpaTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ public async Task TestVueEntrypoint(string pathbase, string url)
Assert.Equal("text/html", response.Content.Headers.ContentType?.MediaType);
string body = await response.Content.ReadAsStringAsync();
Assert.True(body.StartsWith("<!DOCTYPE html>"), "Body is missing DOCTYPE");
Assert.True(body.Contains($"window.resourceBasePath = '{pathbase}/'"), "Body is missing pathbase");
Assert.True(body.Contains($"window.basePath = '{pathbase}/'"), "Body is missing pathbase");
}
}
2 changes: 1 addition & 1 deletion server/Korga/wwwroot/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ <h1>Korga Backend</h1>
</p>
</main>
<script>
window.resourceBasePath = '/'
window.basePath = '/__base_path__/'
</script>
</body>
</html>

0 comments on commit ca1840e

Please sign in to comment.