You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by gr...@apache.org on 2015/07/16 23:52:35 UTC

incubator-usergrid git commit: Pushing test to verify that date issue USERGRID-862 is resolved.

Repository: incubator-usergrid
Updated Branches:
  refs/heads/two-dot-o-dev 1fe579846 -> 800ce21ed


Pushing test to verify that date issue USERGRID-862 is resolved.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/800ce21e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/800ce21e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/800ce21e

Branch: refs/heads/two-dot-o-dev
Commit: 800ce21ed09626fcb7e9f883d8dbdf89af012fd3
Parents: 1fe5798
Author: GERey <gr...@apigee.com>
Authored: Thu Jul 16 14:52:33 2015 -0700
Committer: GERey <gr...@apigee.com>
Committed: Thu Jul 16 14:52:33 2015 -0700

----------------------------------------------------------------------
 .../collection/CollectionsResourceIT.java       | 29 ++++++++++++++++++++
 1 file changed, 29 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/800ce21e/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
----------------------------------------------------------------------
diff --git a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
index 2d9f126..3dadc5b 100644
--- a/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
+++ b/stack/rest/src/test/java/org/apache/usergrid/rest/applications/collection/CollectionsResourceIT.java
@@ -126,6 +126,35 @@ public class CollectionsResourceIT extends AbstractRestIT {
 */
     }
 
+    @Test
+    public void postToReservedField() throws Exception {
+        Entity payload = new Entity();
+        payload.put( "term_date", "12/31/9999" );
+        payload.put( "effective_date","2015-04-20T17:41:38.035Z" );
+        payload.put("junk","TEST");
+
+        this.app().collection( "testCollection" ).post( payload );
+        refreshIndex();
+        Thread.sleep( 1000 );
+
+        Collection collection = this.app().collection( "testCollection" ).get();
+
+        assertNotEquals(0, collection.getNumOfEntities() );
+
+        payload = new Entity();
+        payload.put( "term_date","1991-17-10" );
+        payload.put( "effective_date","HELLO WORLD!" );
+        payload.put("junk","TEST");
+
+        this.app().collection( "testCollection" ).post( payload );
+        refreshIndex();
+        Thread.sleep( 1000 );
+
+        collection = this.app().collection( "testCollection" ).get();
+
+        assertEquals( 2, collection.getNumOfEntities() );
+
+    }
 
     /**
      * Test posts with a user level token on a path with permissions