module tests: add tests for coercedTo

This commit is contained in:
Nikolay Amiantov
2017-02-02 01:52:40 +03:00
parent 5cbcd3af69
commit fcb20b9fee
4 changed files with 21 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{ lib, ... }:
{
options = {
value = lib.mkOption {
default = 42;
type = lib.types.coercedTo lib.types.int builtins.toString lib.types.str;
};
};
}

View File

@@ -0,0 +1,3 @@
{
value = [];
}

View File

@@ -0,0 +1,3 @@
{
value = "24";
}