Skip to content

Commit 9fc2503

Browse files
committed
Fixing Audit and Grant Unit Test
1 parent 89b80b7 commit 9fc2503

2 files changed

Lines changed: 72 additions & 72 deletions

File tree

‎src/test/java/com/pubnub/api/endpoints/access/AuditEndpointTest.java‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public void testSuccessChannelGroupSync() throws PubNubException {
4848

4949
stubFor(get(urlPathEqualTo("/v1/auth/audit/sub-key/mySubscribeKey"))
5050
.withQueryParam("pnsdk", matching("PubNub-Java-Unified/suchJava"))
51-
.withQueryParam("instanceId", matching("PubNubInstanceId"))
52-
.withQueryParam("requestId", matching("PubNubRequestId"))
53-
.withQueryParam("signature", matching("dVle3aE_grdzKypoEegdNSZs_CXpJQJEcnqcM0nMH0Q%3D%0A"))
51+
.withQueryParam("instanceid", matching("PubNubInstanceId"))
52+
.withQueryParam("requestid", matching("PubNubRequestId"))
53+
.withQueryParam("signature", matching("rnb_-C8C4twE5IlyMeSlTyF4538WNv4uKCQu6jQwggU%3D%0A"))
5454
.withQueryParam("channel-group", matching("cg1"))
5555
.withQueryParam("auth", matching("key1"))
5656
.withQueryParam("uuid", matching("myUUID"))
@@ -78,9 +78,9 @@ public void testSuccessChannelSync() throws PubNubException {
7878
.withQueryParam("pnsdk", matching("PubNub-Java-Unified/suchJava"))
7979
.withQueryParam("channel", matching("ch1"))
8080
.withQueryParam("auth", matching("key1"))
81-
.withQueryParam("instanceId", matching("PubNubInstanceId"))
82-
.withQueryParam("requestId", matching("PubNubRequestId"))
83-
.withQueryParam("signature", matching("4WIVMIc007EqwYGrqyJuMy5qf-gvtdopDjfaXEa1zOs%3D%0A"))
81+
.withQueryParam("instanceid", matching("PubNubInstanceId"))
82+
.withQueryParam("requestid", matching("PubNubRequestId"))
83+
.withQueryParam("signature", matching("l0mnete94wADUcKR6THq1L4nhJrJg5q7eot0uRWoT8U%3D%0A"))
8484
.withQueryParam("uuid", matching("myUUID"))
8585
.withQueryParam("timestamp", matching("1337"))
8686
.willReturn(aResponse().withBody("{\"message\":\"Success\",\"payload\":{\"level\":\"user\",\"subscribe_key\":\"sub-c-82ab2196-b64f-11e5-8622-0619f8945a4f\",\"channel\":\"ch1\",\"auths\":{\"key1\":{\"r\":1,\"m\":1,\"w\":1}}},\"service\":\"Access Manager\",\"status\":200}")));
@@ -147,9 +147,9 @@ public void testIsAuthRequiredSuccessSync() throws IOException, PubNubException,
147147
.withQueryParam("pnsdk", matching("PubNub-Java-Unified/suchJava"))
148148
.withQueryParam("channel-group", matching("cg1"))
149149
.withQueryParam("auth", matching("key1"))
150-
.withQueryParam("instanceId", matching("PubNubInstanceId"))
151-
.withQueryParam("requestId", matching("PubNubRequestId"))
152-
.withQueryParam("signature", matching("dVle3aE_grdzKypoEegdNSZs_CXpJQJEcnqcM0nMH0Q%3D%0A"))
150+
.withQueryParam("instanceid", matching("PubNubInstanceId"))
151+
.withQueryParam("requestid", matching("PubNubRequestId"))
152+
.withQueryParam("signature", matching("rnb_-C8C4twE5IlyMeSlTyF4538WNv4uKCQu6jQwggU%3D%0A"))
153153
.withQueryParam("uuid", matching("myUUID"))
154154
.withQueryParam("timestamp", matching("1337"))
155155
.willReturn(aResponse().withBody("{\"message\":\"Success\",\"payload\":{\"level\":\"channel-group+auth\",\"subscribe_key\":\"sub-c-82ab2196-b64f-11e5-8622-0619f8945a4f\",\"channel-group\":\"cg2\",\"auths\":{\"key1\":{\"r\":1,\"m\":1,\"w\":1}}},\"service\":\"Access Manager\",\"status\":200}")));

0 commit comments

Comments
 (0)