Fix get profile

This commit is contained in:
Alexander Sheiko 2020-06-15 11:42:12 +03:00
parent efa4f96e3c
commit 2dc80b95cf
2 changed files with 3 additions and 2 deletions

View file

@ -37,6 +37,7 @@ func GetProfile(username string) (Profile, error) {
}
req.Header.Set("Accept-Language", "en-US")
req.Header.Set("X-Requested-With", "XMLHttpRequest")
resp, err := http.DefaultClient.Do(req)
if resp == nil {

View file

@ -12,8 +12,8 @@ func TestGetProfile(t *testing.T) {
loc := time.FixedZone("UTC", 0)
joined := time.Date(2007, 02, 20, 6, 35, 0, 0, loc)
sample := Profile{
Avatar: "https://pbs.twimg.com/profile_images/1111729635610382336/_65QFl7B_400x400.png",
Biography: "Whats happening?!",
Avatar: "https://pbs.twimg.com/profile_images/1270500941498912768/W-80pLvu_400x400.jpg",
Biography: "Black queer lives matter.\nBlack trans lives matter.\n#BlackLivesMatter",
Birthday: "March 21",
Joined: &joined,
Location: "Everywhere",