From: jdramaix Date: Fri, 29 Nov 2013 11:48:13 +0000 (+0100) Subject: add test for issue #216 X-Git-Tag: release-1.4.0~25^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=20a9a202e9e79bb72807ccda0d0526e2200fcf72;p=gwtquery.git add test for issue #216 --- diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java index c86b67e4..50f99d6f 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java @@ -2049,4 +2049,18 @@ public class GQueryCoreTestGwt extends GWTTestCase { assertEquals(ulParentsNumber + 2, result.size()); } + // issue #216 : https://github.com/gwtquery/gwtquery/issues/216 + public void testDataAsInteger() { + $(e).html("
"); + + GQuery target = $("#target", e); + + $("#target", e).data("intValue", new Integer(1)); + + Integer value = $("#target", e).data("intValue", Integer.class); + + assertEquals(1, value.intValue()); + + } + }