1
mirror of https://gitlab.com/commento/commento.git synced 2026-06-17 09:55:27 -04:00

config_test.go: add test for no ORIGIN

This commit is contained in:
Adhityaa
2018-06-09 14:03:06 +05:30
parent 37e772b595
commit c208e3392b
+9
View File
@@ -33,6 +33,15 @@ func TestParseConfigBasics(t *testing.T) {
}
}
func TestParseConfigNoOrigin(t *testing.T) {
os.Setenv("COMMENTO_ORIGIN", "")
if err := parseConfig(); err == nil {
t.Errorf("expected error not found parsing config without ORIGIN")
return
}
}
func TestParseConfigStatic(t *testing.T) {
os.Setenv("COMMENTO_ORIGIN", "https://commento.io")