PLT-4157 CLI to make a user active or inactive (#4025)

Этот коммит содержится в:
enahum
2016-09-15 12:33:16 -03:00
коммит произвёл Harrison Healey
родитель 2659d19d05
Коммит 9d40538106
2 изменённых файлов: 66 добавлений и 1 удалений

Просмотреть файл

@@ -417,3 +417,27 @@ func TestCliCreateChannel(t *testing.T) {
t.Fatal()
}
}
func TestCliMakeUserActiveAndInactive(t *testing.T) {
if disableCliTests {
return
}
th := Setup().InitBasic()
// first inactivate the user
cmd := exec.Command("bash", "-c", `go run ../mattermost.go -activate_user -inactive -email="`+th.BasicUser.Email+`"`)
output, err := cmd.CombinedOutput()
if err != nil {
t.Log(string(output))
t.Fatal()
}
// activate the inactive user
cmd2 := exec.Command("bash", "-c", `go run ../mattermost.go -activate_user -email="`+th.BasicUser.Email+`"`)
output2, err2 := cmd2.CombinedOutput()
if err2 != nil {
t.Log(string(output2))
t.Fatal()
}
}