Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yusuke/twitter4j
Browse files Browse the repository at this point in the history
Conflicts:
	readme.txt
  • Loading branch information
yusuke committed May 5, 2013
2 parents a8f09e3 + 768a59b commit 1b15def
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Ciaran Jessup <ciaranj at gmail.com> @ciaran_j
Cole Wen <wennnnke at gmail.com> @Pigwen
Dan Checkoway <dcheckoway at gmail.com>
Danaja Maldeniya <danajamkdt at gmail.com> @DanajaT
Daniel Huckaby <handlerexploit at gmail.com> @HandlerExploit
Dong Wang <dong at twitter.com> @dongwang218
Eric Jensen <ej at twitter.com> @ej
Fiaz Hossain <fiaz at twitter.com> @fiazhossain
Expand Down
12 changes: 9 additions & 3 deletions twitter4j-core/src/test/java/twitter4j/auth/OAuthTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ public void testSigninWithTwitter() throws Exception {
response = http.request(new HttpRequest(RequestMethod.POST, authorizeURL, params, null, props));

// response = http.post(authorizeURL, params);
at = twitter.getOAuthAccessToken(rt);
resStr = response.asString();
String oauthVerifier = catchPattern(resStr, "&oauth_verifier=", "\">");

at = twitter.getOAuthAccessToken(rt, oauthVerifier);
assertEquals(at.getScreenName(), id1.screenName);
assertEquals(at.getUserId(), id1.id);

Expand Down Expand Up @@ -217,7 +220,10 @@ public void testBrowserClient() throws Exception {
params[2] = new HttpParameter("session[username_or_email]", id1.screenName);
params[3] = new HttpParameter("session[password]", id1.password);
response = http.request(new HttpRequest(RequestMethod.POST, authorizeURL, params, null, props));
at = twitter.getOAuthAccessToken(rt);
resStr = response.asString();
String oauthVerifier = catchPattern(resStr, "&oauth_verifier=", "\">");

at = twitter.getOAuthAccessToken(rt, oauthVerifier);
assertEquals(at.getScreenName(), id1.screenName);
assertEquals(at.getUserId(), id1.id);

Expand Down Expand Up @@ -264,7 +270,7 @@ public void testBrowserClientWithCustomCallback() throws Exception {

at = twitter.getOAuthAccessToken(rt, oauthVerifier);
assertEquals(at.getScreenName(), id1.screenName);
assertEquals(at.getUserId(), 6358482);
assertEquals(at.getUserId(), id1.id);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public void testSSL() throws Exception {
writeFile("./twitter4j.properties", "restBaseURL=http://somewhere.com/");
conf = new PropertyConfiguration("/");
assertEquals("http://somewhere.com/", conf.getRestBaseURL());

deleteFile("./twitter4j.properties");
}

public void testTwitter4jPrefixOmittable() throws Exception {
Expand Down

0 comments on commit 1b15def

Please sign in to comment.