Create theme dir if needed (#49)
- Use Path.Combine throughout - Update theme versions - Update generator version
This commit is contained in:
@@ -118,16 +118,19 @@ let displayThemeTests = testList "DisplayTheme.FromTheme" [
|
||||
Expect.isFalse model.IsOnDisk "IsOnDisk should not have been set"
|
||||
}
|
||||
test "succeeds when a non-default theme is not in use and is on disk" {
|
||||
let dir = Directory.CreateDirectory "themes"
|
||||
let file = File.Create "./themes/another-theme.zip"
|
||||
let dir = Directory.CreateDirectory "themes"
|
||||
try
|
||||
let model = DisplayTheme.FromTheme (fun _ -> false) { theme with Id = ThemeId "another" }
|
||||
Expect.isFalse model.IsInUse "IsInUse should not have been set"
|
||||
Expect.isTrue model.IsOnDisk "IsOnDisk should have been set"
|
||||
let testFile = Path.Combine(".", "themes", "another-theme.zip")
|
||||
let file = File.Create testFile
|
||||
try
|
||||
let model = DisplayTheme.FromTheme (fun _ -> false) { theme with Id = ThemeId "another" }
|
||||
Expect.isFalse model.IsInUse "IsInUse should not have been set"
|
||||
Expect.isTrue model.IsOnDisk "IsOnDisk should have been set"
|
||||
finally
|
||||
file.Close()
|
||||
file.Dispose()
|
||||
File.Delete testFile
|
||||
finally
|
||||
file.Close()
|
||||
file.Dispose()
|
||||
File.Delete "./themes/another-theme.zip"
|
||||
dir.Delete()
|
||||
}
|
||||
test "succeeds when the default theme is on disk" {
|
||||
|
||||
Reference in New Issue
Block a user