Skip to content

Commit 9c00cee

Browse files
committed
clean up the OAuthTest
1 parent 1d68992 commit 9c00cee

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/test/java/com/patreon/PatreonOAuthTest.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22

33
import junit.framework.TestCase;
44

5-
import static com.patreon.PatreonAPITest.p;
6-
75
public class PatreonOAuthTest extends TestCase {
86
PatreonOAuth oauth = new PatreonOAuth(
97
"a client id",
108
"your secret",
119
"your redirect URI"
1210
);
1311
public void testGetToken() throws Exception {
14-
p(oauth.getAuthorizationURL("https://ardentbot.com"));
12+
oauth.getAuthorizationURL("https://patreon-example-oauth.com");
1513
PatreonOAuth.TokensResponse token = oauth.getTokens("a code");
16-
p(token.getAccessToken());
17-
p(token.getRefreshToken());
14+
token.getAccessToken();
15+
token.getRefreshToken();
1816
PatreonOAuth.TokensResponse refreshed = oauth.refreshTokens(token.getRefreshToken());
19-
p(refreshed.getAccessToken());
20-
p(refreshed.getRefreshToken());
17+
refreshed.getAccessToken();
18+
refreshed.getRefreshToken();
2119
PatreonAPI api = new PatreonAPI(refreshed.getAccessToken());
22-
p(api.getMyUser().getData().getAttributes().getEmail());
20+
api.fetchUser().get().getEmail();
2321
}
2422

2523

0 commit comments

Comments
 (0)