mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix URL for test connection in Trello repository
This commit is contained in:
@@ -376,7 +376,7 @@ public final class TrelloRepository extends NewBaseRepositoryImpl {
|
||||
@Nullable
|
||||
@Override
|
||||
public CancellableConnection createCancellableConnection() {
|
||||
return new HttpTestConnection(new HttpGet(getRestApiUrl("me", "cards") + "?limit=1"));
|
||||
return new HttpTestConnection(new HttpGet(getRestApiUrl("members", "me", "cards") + "?limit=1"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+9
@@ -156,6 +156,15 @@ public class TrelloIntegrationTest extends LiveIntegrationTestCase<TrelloReposit
|
||||
assertEquals(EnumSet.of(SKY, LIME, PINK, BLACK), card.getColors());
|
||||
}
|
||||
|
||||
public void testTestConnection() throws Exception {
|
||||
assertNull(myRepository.createCancellableConnection().call());
|
||||
|
||||
myRepository.setPassword("illegal password");
|
||||
final Exception error = myRepository.createCancellableConnection().call();
|
||||
assertNotNull(error);
|
||||
assertTrue(error.getMessage().contains("Unauthorized"));
|
||||
}
|
||||
|
||||
static void assertObjectsNamed(@NotNull String message, @NotNull Collection<? extends TrelloModel> objects, @NotNull String... names) {
|
||||
assertEquals(message, ContainerUtil.newHashSet(names), ContainerUtil.map2Set(objects, new Function<TrelloModel, String>() {
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user