add unit test for IsRoot

Signed-off-by: Zhou Hao <zhouhao@cn.fujitsu.com>
Signed-off-by: Matheus Hunsche <matheus.hunsche@ifood.com.br>
pull/8840/head
Zhou Hao 6 years ago committed by Matheus Hunsche
parent 3f0bc51a6a
commit 764cabf056

@ -96,3 +96,24 @@ func TestMetadata(t *testing.T) {
is.Equal("1.0.0", chrt.AppVersion())
is.Equal(nil, chrt.Validate())
}
func TestIsRoot(t *testing.T) {
chrt1 := Chart{
parent: &Chart{
Metadata: &Metadata{
Name: "foo",
},
},
}
chrt2 := Chart{
Metadata: &Metadata{
Name: "foo",
},
}
is := assert.New(t)
is.Equal(false, chrt1.IsRoot())
is.Equal(true, chrt2.IsRoot())
}

Loading…
Cancel
Save