@@ -159,13 +159,13 @@ async fn test_anonymous_viewer(pool: PgPool) {
159
159
let state = TestState :: from_pool ( pool) . await . unwrap ( ) ;
160
160
161
161
let req = Request :: post ( "/graphql" ) . json ( serde_json:: json!( {
162
- "query" : r# "
162
+ "query" : r"
163
163
query {
164
164
viewer {
165
165
__typename
166
166
}
167
167
}
168
- "# ,
168
+ " ,
169
169
} ) ) ;
170
170
171
171
let response = state. request ( req) . await ;
@@ -199,7 +199,7 @@ async fn test_oauth2_viewer(pool: PgPool) {
199
199
let req = Request :: post ( "/graphql" )
200
200
. bearer ( & access_token)
201
201
. json ( serde_json:: json!( {
202
- "query" : r# "
202
+ "query" : r"
203
203
query {
204
204
viewer {
205
205
__typename
@@ -210,7 +210,7 @@ async fn test_oauth2_viewer(pool: PgPool) {
210
210
}
211
211
}
212
212
}
213
- "# ,
213
+ " ,
214
214
} ) ) ;
215
215
216
216
let response = state. request ( req) . await ;
@@ -246,13 +246,13 @@ async fn test_oauth2_no_scope(pool: PgPool) {
246
246
let req = Request :: post ( "/graphql" )
247
247
. bearer ( & access_token)
248
248
. json ( serde_json:: json!( {
249
- "query" : r# "
249
+ "query" : r"
250
250
query {
251
251
viewer {
252
252
__typename
253
253
}
254
254
}
255
- "# ,
255
+ " ,
256
256
} ) ) ;
257
257
258
258
let response = state. request ( req) . await ;
@@ -294,14 +294,14 @@ async fn test_oauth2_admin(pool: PgPool) {
294
294
let request = Request :: post ( "/graphql" )
295
295
. bearer ( & access_token)
296
296
. json ( serde_json:: json!( {
297
- "query" : r# "
297
+ "query" : r"
298
298
query UserQuery($id: ID) {
299
299
user(id: $id) {
300
300
id
301
301
username
302
302
}
303
303
}
304
- "# ,
304
+ " ,
305
305
"variables" : {
306
306
"id" : format!( "user:{id}" , id = user2. id) ,
307
307
} ,
@@ -324,14 +324,14 @@ async fn test_oauth2_admin(pool: PgPool) {
324
324
let request = Request :: post ( "/graphql" )
325
325
. bearer ( & access_token_admin)
326
326
. json ( serde_json:: json!( {
327
- "query" : r# "
327
+ "query" : r"
328
328
query UserQuery($id: ID) {
329
329
user(id: $id) {
330
330
id
331
331
username
332
332
}
333
333
}
334
- "# ,
334
+ " ,
335
335
"variables" : {
336
336
"id" : format!( "user:{id}" , id = user2. id) ,
337
337
} ,
@@ -392,7 +392,7 @@ async fn test_oauth2_client_credentials(pool: PgPool) {
392
392
let request = Request :: post ( "/graphql" )
393
393
. bearer ( & access_token)
394
394
. json ( serde_json:: json!( {
395
- "query" : r# "
395
+ "query" : r"
396
396
query {
397
397
viewer {
398
398
__typename
@@ -402,7 +402,7 @@ async fn test_oauth2_client_credentials(pool: PgPool) {
402
402
__typename
403
403
}
404
404
}
405
- "# ,
405
+ " ,
406
406
} ) ) ;
407
407
408
408
let response = state. request ( request) . await ;
@@ -459,7 +459,7 @@ async fn test_oauth2_client_credentials(pool: PgPool) {
459
459
let request = Request :: post ( "/graphql" )
460
460
. bearer ( & access_token)
461
461
. json ( serde_json:: json!( {
462
- "query" : r# "
462
+ "query" : r"
463
463
query {
464
464
viewer {
465
465
__typename
@@ -469,7 +469,7 @@ async fn test_oauth2_client_credentials(pool: PgPool) {
469
469
__typename
470
470
}
471
471
}
472
- "# ,
472
+ " ,
473
473
} ) ) ;
474
474
475
475
let response = state. request ( request) . await ;
@@ -535,14 +535,14 @@ async fn test_oauth2_client_credentials(pool: PgPool) {
535
535
let request = Request :: post ( "/graphql" )
536
536
. bearer ( & access_token)
537
537
. json ( serde_json:: json!( {
538
- "query" : r# "
538
+ "query" : r"
539
539
mutation CreateSession($userId: String!, $scope: String!) {
540
540
createOauth2Session(input: {userId: $userId, permanent: true, scope: $scope}) {
541
541
accessToken
542
542
refreshToken
543
543
}
544
544
}
545
- "# ,
545
+ " ,
546
546
"variables" : {
547
547
"userId" : user_id,
548
548
"scope" : "urn:matrix:org.matrix.msc2967.client:device:AABBCCDDEE urn:matrix:org.matrix.msc2967.client:api:* urn:synapse:admin:*"
0 commit comments