Add true/false to auto-htmx converter (#59)
- This will allow backups to be restored, converting the value as part of the restoration
This commit is contained in:
@@ -14,9 +14,13 @@ let autoHtmxTypeConverterTests = testList "AutoHtmxTypeConverter" [
|
||||
let after = JsonConvert.SerializeObject(AutoHtmax, opts)
|
||||
Expect.equal after "\"Max\"" "Auto htmx type serialized incorrectly"
|
||||
}
|
||||
test "succeeds when deserializing" {
|
||||
test "succeeds when deserializing a string" {
|
||||
let after = JsonConvert.DeserializeObject<AutoHtmxType>("\"Yes\"", opts)
|
||||
Expect.equal after AutoHtmx "Auto htmx type not serialized incorrectly"
|
||||
Expect.equal after AutoHtmx "Auto htmx type deserialized incorrectly"
|
||||
}
|
||||
test "succeeds when deserializing a boolean value" {
|
||||
let after = JsonConvert.DeserializeObject<AutoHtmxType>("false", opts)
|
||||
Expect.equal after NoAutoHtmx "Auto htmx type deserialized incorrectly"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -30,7 +34,7 @@ let categoryIdConverterTests = testList "CategoryIdConverter" [
|
||||
}
|
||||
test "succeeds when deserializing" {
|
||||
let after = JsonConvert.DeserializeObject<CategoryId>("\"test-cat-id\"", opts)
|
||||
Expect.equal after (CategoryId "test-cat-id") "Category ID not serialized incorrectly"
|
||||
Expect.equal after (CategoryId "test-cat-id") "Category ID deserialized incorrectly"
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user