aboutsummaryrefslogtreecommitdiffstats
path: root/timetask/http_test.go
blob: e3dad9dd13ffc9a0843473666dc8968901106be7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package timetask

import (
	"flag"
	"io/ioutil"
	"testing"
)

var username, password string

func init() {
	flag.StringVar(&username, "username", "", "Username")
	flag.StringVar(&password, "password", "", "Password")
	flag.Parse()

}

func TestLogin(t *testing.T) {
	response, _ := Login(username, password)
	defer response.Body.Close()
	body, _ := ioutil.ReadAll(response.Body)
	t.Log(response)
	t.Logf("%s", body)
}