pkg/gates: add unit test for String

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 a718a1bcdf
commit 53ff58b227

@ -45,3 +45,12 @@ func TestError(t *testing.T) {
t.Errorf("incorrect error message. Received %s", g.Error().Error()) t.Errorf("incorrect error message. Received %s", g.Error().Error())
} }
} }
func TestString(t *testing.T) {
os.Unsetenv(name)
g := Gate(name)
if g.String() != "HELM_EXPERIMENTAL_FEATURE" {
t.Errorf("incorrect string representation. Received %s", g.String())
}
}

Loading…
Cancel
Save