Skip to content
Snippets Groups Projects
Commit ad28bb66 authored by Rodric Rabbah's avatar Rodric Rabbah Committed by Jason Peterson
Browse files

Fix optional config override when not defined (with test).

parent 4d30f11a
No related branches found
No related tags found
No related merge requests found
......@@ -44,4 +44,10 @@ class ConfigTests extends FlatSpec with Matchers {
assert(config.isValid && config("a") == "A" && config("b") == "xyz" && config("c") == null)
}
it should "override a value with optional value" in {
val config = new Config(Map("a" -> null), optionalProperties = Set("b", "c"))(Map("A" -> "xyz", "B" -> "zyx"))
assert(config.isValid && config("a") == "xyz" && config("b") == "zyx")
assert(config("a", "b") == "zyx")
assert(config("a", "c") == "xyz")
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment