@@ -1324,6 +1324,39 @@ public void testCanGetNodeSubscriptionsWithRsm() throws Exception {
13241324 assertEquals (3 , result2 .size ());
13251325 }
13261326
1327+ @ Test
1328+ public void testCanGetNodeSubscriptionsForOwnerModeratorWithRsm () throws Exception {
1329+ dbTester .loadData ("node_1" );
1330+
1331+ store .addUserSubscription (new NodeSubscriptionImpl (
1332+ TEST_SERVER1_NODE1_ID , TEST_SERVER1_USER3_JID ,
1333+ Subscriptions .subscribed ));
1334+ Thread .sleep (1 );
1335+ store .addUserSubscription (new NodeSubscriptionImpl (
1336+ TEST_SERVER1_NODE1_ID , TEST_SERVER1_USER2_JID ,
1337+ Subscriptions .subscribed ));
1338+ Thread .sleep (1 );
1339+ store .addUserSubscription (new NodeSubscriptionImpl (
1340+ TEST_SERVER1_NODE1_ID , TEST_SERVER1_USER1_JID ,
1341+ Subscriptions .subscribed ));
1342+ Thread .sleep (1 );
1343+ store .addUserSubscription (new NodeSubscriptionImpl (
1344+ TEST_SERVER1_NODE1_ID , TEST_SERVER2_USER1_JID ,
1345+ Subscriptions .subscribed ));
1346+
1347+ ResultSet <NodeSubscription > result = store .getNodeSubscriptions (
1348+ TEST_SERVER1_NODE1_ID , true , TEST_SERVER1_USER1_JID , 50 );
1349+ ResultSet <NodeSubscription > result1 = store .getNodeSubscriptions (
1350+ TEST_SERVER1_NODE1_ID , true , TEST_SERVER1_USER2_JID , 50 );
1351+
1352+ ResultSet <NodeSubscription > result2 = store .getNodeSubscriptions (
1353+ TEST_SERVER1_NODE1_ID , true , TEST_SERVER1_USER3_JID , 50 );
1354+
1355+ assertEquals (1 , result .size ());
1356+ assertEquals (2 , result1 .size ());
1357+ assertEquals (3 , result2 .size ());
1358+ }
1359+
13271360 @ Test
13281361 public void testCanRetrictNodeSubscriptionsCountWithRsm () throws Exception {
13291362
0 commit comments