From 4afef68a1364ad0c3619bccd1e99a99892c2174f Mon Sep 17 00:00:00 2001 From: Bananeweizen Date: Mon, 20 Jan 2014 19:40:02 +0100 Subject: fix #3556: Calendar plugin should also read short description for time --- tests/src/cgeo/geocaching/GeocacheTest.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/src/cgeo/geocaching/GeocacheTest.java b/tests/src/cgeo/geocaching/GeocacheTest.java index cdca9b7..b49048b 100644 --- a/tests/src/cgeo/geocaching/GeocacheTest.java +++ b/tests/src/cgeo/geocaching/GeocacheTest.java @@ -249,6 +249,14 @@ public class GeocacheTest extends CGeoTestCase { assertTime("from 11 to 13 " + timeHours, 11, 00); } + public static void testGuessEventTimeShortDescription() { + Geocache cache = new Geocache(); + cache.setType(CacheType.EVENT); + cache.setDescription(StringUtils.EMPTY); + cache.setShortDescription("text 14:20 text"); + assertEquals(String.valueOf(14 * 60 + 20), cache.guessEventTimeMinutes()); + } + private static void assertTime(final String description, final int hours, final int minutes) { final Geocache cache = new Geocache(); cache.setDescription(description); -- cgit v1.1