17 lines
266 B
Go
17 lines
266 B
Go
|
package main
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestLoadConifg(t *testing.T) {
|
||
|
config := loadConfig()
|
||
|
if len(config.Users) >= 2 {
|
||
|
if value, ok := config.Users["eson"]; !ok {
|
||
|
t.Error(value)
|
||
|
}
|
||
|
|
||
|
if value, ok := config.GetUser("admin"); !ok {
|
||
|
t.Error(value)
|
||
|
}
|
||
|
}
|
||
|
}
|