mirror of
https://github.com/jlengrand/github-api.git
synced 2026-03-20 00:11:22 +00:00
21 lines
810 B
Java
21 lines
810 B
Java
package org.kohsuke.github;
|
|
|
|
import org.junit.Test;
|
|
|
|
import static org.hamcrest.Matchers.*;
|
|
|
|
public class GHObjectTest extends org.kohsuke.github.AbstractGitHubWireMockTest {
|
|
|
|
@Test
|
|
public void test_toString() throws Exception {
|
|
GHOrganization org = gitHub.getOrganization(GITHUB_API_TEST_ORG);
|
|
assertThat(org.toString(),
|
|
containsString(
|
|
"login=hub4j-test-org,location=<null>,blog=<null>,email=<null>,name=<null>,company=<null>,type=Organization,followers=0,following=0"));
|
|
|
|
// getResponseHeaderFields is deprecated but we should not break it.
|
|
assertThat(org.getResponseHeaderFields(), notNullValue());
|
|
assertThat(org.getResponseHeaderFields().get("Cache-Control").get(0), is("private, max-age=60, s-maxage=60"));
|
|
}
|
|
}
|