fix collectionsresourceit

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

Branch: refs/heads/two-dot-o-dev
Commit: 68a2af90cc85aa1eaa47cc90c1587bf70427354b
Parents: 08db2e3
Author: Shawn Feldman <sfeld...@apache.org>
Authored: Tue Jun 2 12:07:40 2015 -0600
Committer: Shawn Feldman <sfeld...@apache.org>
Committed: Tue Jun 2 12:07:40 2015 -0600

----------------------------------------------------------------------
 .../applications/collection/CollectionsResourceIT.java   | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/68a2af90/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 0a0133a..06e1088 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
@@ -149,12 +149,13 @@ public class CollectionsResourceIT extends AbstractRestIT 
{
         assertEquals(user.get("email"), email);
         this.refreshIndex();
 
+        String collectionName = "nestprofiles";
         //create a permission with the path "me" in it
         payload = new Entity();
-        payload.put( "permission", 
"get,post,put,delete:/users/sumeet.agar...@usergrid.com/**" );
+        payload.put( "permission", 
"get,post,put,delete:/"+collectionName+"/**" );
         //POST to /users/sumeet.agar...@usergrid.com/permissions
         Entity permission = 
this.app().collection("users").entity(user).collection("permissions").post(payload);
-        assertEquals(permission.get("data"), 
"get,post,put,delete:/users/sumeet.agar...@usergrid.com/**");
+        assertEquals(permission.get("data"), 
"get,post,put,delete:/"+collectionName+"/**");
 
         //delete the default role, which would allow all authenticated requests
         this.app().collection("role").uniqueID("Default").delete();
@@ -171,13 +172,13 @@ public class CollectionsResourceIT extends AbstractRestIT 
{
         payload.put( "firstname", "sumeet" );
         payload.put( "lastname", "agarwal" );
         payload.put( "mobile", "122" );
-        Entity nestProfile = 
this.app().collection("nestprofiles").post(payload);
+        Entity nestProfile = 
this.app().collection(collectionName).post(payload);
         assertEquals(nestProfile.get("name"), profileName);
 
         this.refreshIndex();
 
-        Entity nestprofileReturned = 
this.app().collection("nestprofiles").entity(nestProfile).get();
-        assertEquals(nestprofileReturned.get("name"), name);
+        Entity nestprofileReturned = 
this.app().collection(collectionName).entity(nestProfile).get();
+        assertEquals(nestprofileReturned.get("name"), profileName);
 
     }
 

Reply via email to