@@ -6,43 +6,43 @@ describe("Pusher", function () {
6
6
var pusher
7
7
8
8
beforeEach ( function ( ) {
9
- pusher = new Pusher ( { appId : 10000 , key : "aaaa" , secret : "beef " } )
9
+ pusher = new Pusher ( { appId : 10000 , key : "aaaa" , secret : "tofu " } )
10
10
} )
11
11
12
12
describe ( "#auth" , function ( ) {
13
13
it ( "should prefix the signature with the app key" , function ( ) {
14
- var pusher = new Pusher ( { appId : 10000 , key : "1234" , secret : "beef " } )
14
+ var pusher = new Pusher ( { appId : 10000 , key : "1234" , secret : "tofu " } )
15
15
expect ( pusher . authenticate ( "123.456" , "test" ) ) . to . eql ( {
16
16
auth :
17
- "1234:d16bec9b73b4b3b9186bc5ce87daddc14e6afa714f663fd35839f94be1707ea3 " ,
17
+ "1234:efa6cf7644a0b35cba36aa0f776f3cbf7bb60e95ea2696bde1dbe8403b61bd7c " ,
18
18
} )
19
19
20
- pusher = new Pusher ( { appId : 10000 , key : "abcdef" , secret : "beef " } )
20
+ pusher = new Pusher ( { appId : 10000 , key : "abcdef" , secret : "tofu " } )
21
21
expect ( pusher . authenticate ( "123.456" , "test" ) ) . to . eql ( {
22
22
auth :
23
- "abcdef:d16bec9b73b4b3b9186bc5ce87daddc14e6afa714f663fd35839f94be1707ea3 " ,
23
+ "abcdef:efa6cf7644a0b35cba36aa0f776f3cbf7bb60e95ea2696bde1dbe8403b61bd7c " ,
24
24
} )
25
25
} )
26
26
27
27
it ( "should return correct authentication signatures for different socket ids" , function ( ) {
28
28
expect ( pusher . authenticate ( "123.456" , "test" ) ) . to . eql ( {
29
29
auth :
30
- "aaaa:d16bec9b73b4b3b9186bc5ce87daddc14e6afa714f663fd35839f94be1707ea3 " ,
30
+ "aaaa:efa6cf7644a0b35cba36aa0f776f3cbf7bb60e95ea2696bde1dbe8403b61bd7c " ,
31
31
} )
32
32
expect ( pusher . authenticate ( "321.654" , "test" ) ) . to . eql ( {
33
33
auth :
34
- "aaaa:69858dbfae85099306caa764f698d4e29970d93baa746a6df6788c92c0ec4409 " ,
34
+ "aaaa:f6ecb0a17d3e4f68aca28f1673197a7608587c09deb0208faa4b5519aee0a777 " ,
35
35
} )
36
36
} )
37
37
38
38
it ( "should return correct authentication signatures for different channels" , function ( ) {
39
39
expect ( pusher . authenticate ( "123.456" , "test1" ) ) . to . eql ( {
40
40
auth :
41
- "aaaa:2e8533af473c22fbf5456375ace186413bcdd64513edefc60657d7327c1a43af " ,
41
+ "aaaa:d5ab857f805433cb50562da96afa41688d7742a3c3a021ed15a4d991a4d8cf94 " ,
42
42
} )
43
43
expect ( pusher . authenticate ( "123.456" , "test2" ) ) . to . eql ( {
44
44
auth :
45
- "aaaa:c26e4dce5ab543b2deac513708ea03e91aac2cd1caa4cdd261fc7739ba09cfbe " ,
45
+ "aaaa:43affa6a09af1fb9ce1cadf176171346beaf7366673ec1e5920f68b3e97a466d " ,
46
46
} )
47
47
} )
48
48
@@ -68,19 +68,19 @@ describe("Pusher", function () {
68
68
it ( "should return correct authentication signatures with and without the channel data" , function ( ) {
69
69
expect ( pusher . authenticate ( "123.456" , "test" ) ) . to . eql ( {
70
70
auth :
71
- "aaaa:d16bec9b73b4b3b9186bc5ce87daddc14e6afa714f663fd35839f94be1707ea3 " ,
71
+ "aaaa:efa6cf7644a0b35cba36aa0f776f3cbf7bb60e95ea2696bde1dbe8403b61bd7c " ,
72
72
} )
73
73
expect ( pusher . authenticate ( "123.456" , "test" , { foo : "bar" } ) ) . to . eql ( {
74
74
auth :
75
- "aaaa:4ec8fab54df3950d32d95a579e46b53060ea3579bc678842a80b7c530f90d439 " ,
75
+ "aaaa:f41faf9ead2ea76772cc6b1168363057459f02499ae4d92e88229dc7f4efa2d4 " ,
76
76
channel_data : '{"foo":"bar"}' ,
77
77
} )
78
78
} )
79
79
80
80
it ( "should return correct authentication signature with utf-8 in channel data" , function ( ) {
81
81
expect ( pusher . authenticate ( "1.1" , "test" , "ą§¶™€łü€ß£" ) ) . to . eql ( {
82
82
auth :
83
- "aaaa:0d392e309f194ebfd063409e2a35d1e5f0fb0148e6ff5e9e92233816a70f2a12 " ,
83
+ "aaaa:2a229263e89d9c50524fd80c2e88be2843379f6931e28995e2cc214282c9db0c " ,
84
84
channel_data : '"ą§¶™€łü€ß£"' ,
85
85
} )
86
86
} )
@@ -155,7 +155,7 @@ describe("Pusher with encryptionMasterKey", function () {
155
155
pusher = new Pusher ( {
156
156
appId : 1234 ,
157
157
key : "f00d" ,
158
- secret : "beef " ,
158
+ secret : "tofu " ,
159
159
encryptionMasterKey : testMasterKey ,
160
160
} )
161
161
} )
@@ -166,15 +166,15 @@ describe("Pusher with encryptionMasterKey", function () {
166
166
pusher . authenticate ( "123.456" , "private-encrypted-bla" , "foo" )
167
167
) . to . eql ( {
168
168
auth :
169
- "f00d:d8df1e524cf38fbde4f1dc38e6eaa4943e60412122801eed1f0e89c8a1268784 " ,
169
+ "f00d:962c48b78bf93d98ff4c92ee7dff04865821455b7b401e9d60a9e0a90af2c105 " ,
170
170
channel_data : '"foo"' ,
171
171
shared_secret : "BYBsePpRCQkGPvbWu/5j8x+MmUF5sgPH5DmNBwkTzYs=" ,
172
172
} )
173
173
} )
174
174
it ( "should not return a shared_secret for non-encrypted channels" , function ( ) {
175
175
expect ( pusher . authenticate ( "123.456" , "bla" , "foo" ) ) . to . eql ( {
176
176
auth :
177
- "f00d:4c48fa1cb34537501eb3291b28c0b04de270008ae418bc3141f4f11680abe312 " ,
177
+ "f00d:013ad3da0d88e0df6ae0a8184bef50b9c3933f2344499e6e3d1ad67fad799e20 " ,
178
178
channel_data : '"foo"' ,
179
179
} )
180
180
} )
0 commit comments