config: tests

This commit is contained in:
Mitchell Hashimoto 2014-07-22 08:53:03 -07:00
parent 7b3a462ad1
commit 935fa1d6fb
1 changed files with 17 additions and 0 deletions

View File

@ -133,6 +133,23 @@ func TestNewUserVariable(t *testing.T) {
}
}
func TestNewUserVariable_map(t *testing.T) {
v, err := NewUserVariable("var.bar.baz")
if err != nil {
t.Fatalf("err: %s", err)
}
if v.Name != "bar" {
t.Fatalf("bad: %#v", v.Name)
}
if v.Elem != "baz" {
t.Fatalf("bad: %#v", v.Elem)
}
if v.FullKey() != "var.bar.baz" {
t.Fatalf("bad: %#v", v)
}
}
func TestFunctionInterpolation_impl(t *testing.T) {
var _ Interpolation = new(FunctionInterpolation)
}