aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorblafoo <github@blafoo.de>2012-05-16 21:55:49 +0200
committerblafoo <github@blafoo.de>2012-05-16 21:55:49 +0200
commite19127c1e27ee445c1249396badd23d03cffb6bf (patch)
treef3380eeb84d86788dd92afaf835a3d0bb6ad3051 /tests
parentb7ea5565f8a9e48d1ca0841479793a3ef535e2c2 (diff)
downloadcgeo-e19127c1e27ee445c1249396badd23d03cffb6bf.zip
cgeo-e19127c1e27ee445c1249396badd23d03cffb6bf.tar.gz
cgeo-e19127c1e27ee445c1249396badd23d03cffb6bf.tar.bz2
Handle "Renew Your Membership!". Fixes #1224
Diffstat (limited to 'tests')
-rw-r--r--tests/src/cgeo/geocaching/SettingsTest.java3
-rw-r--r--tests/src/cgeo/geocaching/utils/BaseUtilsTest.java2
2 files changed, 3 insertions, 2 deletions
diff --git a/tests/src/cgeo/geocaching/SettingsTest.java b/tests/src/cgeo/geocaching/SettingsTest.java
index f40b57f..06b849d 100644
--- a/tests/src/cgeo/geocaching/SettingsTest.java
+++ b/tests/src/cgeo/geocaching/SettingsTest.java
@@ -1,5 +1,6 @@
package cgeo.geocaching;
+import cgeo.geocaching.connector.gc.GCConstants;
import cgeo.geocaching.maps.mapsforge.MapsforgeMapProvider;
import android.test.ActivityInstrumentationTestCase2;
@@ -27,6 +28,6 @@ public class SettingsTest extends ActivityInstrumentationTestCase2<cgeo> {
}
public static void testSettings() {
- assertEquals(Settings.getMemberStatus(), "Premium Member");
+ assertEquals(Settings.getMemberStatus(), GCConstants.MEMBER_STATUS_PM);
}
}
diff --git a/tests/src/cgeo/geocaching/utils/BaseUtilsTest.java b/tests/src/cgeo/geocaching/utils/BaseUtilsTest.java
index e174d1f..fe790af 100644
--- a/tests/src/cgeo/geocaching/utils/BaseUtilsTest.java
+++ b/tests/src/cgeo/geocaching/utils/BaseUtilsTest.java
@@ -9,7 +9,7 @@ public class BaseUtilsTest extends AndroidTestCase {
public static void testRegEx() {
String page = MockedCache.readCachePage("GC2CJPF");
assertEquals("blafoo", BaseUtils.getMatch(page, GCConstants.PATTERN_LOGIN_NAME, true, "???"));
- assertTrue(page.contains("id=\"ctl00_hlRenew\"") || "Premium Member".equals(BaseUtils.getMatch(page, GCConstants.PATTERN_MEMBER_STATUS, true, "???")));
+ assertTrue(page.contains("id=\"ctl00_hlRenew\"") || GCConstants.MEMBER_STATUS_PM.equals(BaseUtils.getMatch(page, GCConstants.PATTERN_MEMBER_STATUS, true, "???")));
int cachesFound = 0;
try {
cachesFound = Integer.parseInt(BaseUtils.getMatch(page, GCConstants.PATTERN_CACHES_FOUND, true, "0").replaceAll("[,.]", ""));