This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
relationship_test.go
64 lines (55 loc) · 1.87 KB
/
relationship_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
package gostagram
import "testing"
func LogRelationShip(rel *Relationship, t *testing.T) {
t.Log(DefaultStringValueIfEmpty(rel.IncomingStatus))
t.Log(DefaultStringValueIfEmpty(rel.OutgoingStatus))
}
func TestClient_GetCurrentUserRelationship(t *testing.T) {
FatalIfEmptyString(other_user_id, "user id cannot be empty.", t)
client := CreateClient(t)
tmp, err := client.GetCurrentUserRelationship(other_user_id)
PanicIfError(err, t)
LogRelationShip(tmp, t)
}
func TestClient_UnFollowUserById(t *testing.T) {
FatalIfEmptyString(other_user_id, "user id cannot be empty.", t)
client := CreateClient(t)
tmp, err := client.UnFollowUserById(other_user_id)
PanicIfError(err, t)
LogRelationShip(tmp, t)
}
func TestClient_FollowUserById(t *testing.T) {
FatalIfEmptyString(other_user_id, "user id cannot be empty.", t)
client := CreateClient(t)
tmp, err := client.FollowUserById(other_user_id)
PanicIfError(err, t)
LogRelationShip(tmp, t)
}
func TestClient_BlockUserById(t *testing.T) {
FatalIfEmptyString(other_user_id, "user id cannot be empty.", t)
client := CreateClient(t)
tmp, err := client.BlockUserById(other_user_id)
PanicIfError(err, t)
LogRelationShip(tmp, t)
}
func TestClient_UnBlockUserById(t *testing.T) {
FatalIfEmptyString(other_user_id, "user id cannot be empty.", t)
client := CreateClient(t)
tmp, err := client.UnBlockUserById(other_user_id)
PanicIfError(err, t)
LogRelationShip(tmp, t)
}
func TestClient_IgnoreUserById(t *testing.T) {
FatalIfEmptyString(other_user_id, "user id cannot be empty.", t)
client := CreateClient(t)
tmp, err := client.IgnoreUserById(other_user_id)
PanicIfError(err, t)
LogRelationShip(tmp, t)
}
func TestClient_ApproveUserById(t *testing.T) {
FatalIfEmptyString(other_user_id, "user id cannot be empty.", t)
client := CreateClient(t)
tmp, err := client.ApproveUserById(other_user_id)
PanicIfError(err, t)
LogRelationShip(tmp, t)
}