From 3c0dbc1685db1b1fe7f29e5e91ac6c992b6c942c Mon Sep 17 00:00:00 2001 From: Samuel Tardieu Date: Thu, 10 May 2012 11:40:24 +0200 Subject: Fix #1520: display gc.com resources present on trackable descriptions URLs without scheme and host in trackable description were not fetched from geocaching.com as the connector did not acknowledge that it can handle trackables by geocode. --- tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests') diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java index 065589b..12e7e22 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCConnectorTest.java @@ -30,6 +30,12 @@ public class GCConnectorTest extends AbstractResourceInstrumentationTestCase { } } + public static void testCanHandle() { + assertTrue(GCConnector.getInstance().canHandle("GC2MEGA")); + assertTrue(GCConnector.getInstance().canHandle("TB3F651")); + assertFalse(GCConnector.getInstance().canHandle("OXZZZZZ")); + } + public static void testBaseCodings() { assertEquals(2045702, GCConstants.gccodeToGCId("GC2MEGA")); } -- cgit v1.1