]> source.dussan.org Git - gwtquery.git/commitdiff
add test for issue #216
authorjdramaix <julien.dramaix@gmail.com>
Fri, 29 Nov 2013 11:48:13 +0000 (12:48 +0100)
committerjdramaix <julien.dramaix@gmail.com>
Fri, 29 Nov 2013 11:48:13 +0000 (12:48 +0100)
gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTestGwt.java

index c86b67e4738d82bd2509216307f21fcc032c25cf..50f99d6f26b8438e77fb12640dea2abcc05acf79 100644 (file)
@@ -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("<div id='target'></div>");
+
+    GQuery target = $("#target", e);
+
+    $("#target", e).data("intValue", new Integer(1));
+
+    Integer value = $("#target", e).data("intValue", Integer.class);
+
+    assertEquals(1, value.intValue());
+
+  }
+
 }