@@ -327,7 +327,6 @@ func TestAddUserAccount(t *testing.T) {
327
327
displayName = random .AlphaNumeric ()
328
328
justCountDisplayName = strings .Repeat ("亜" , 256 )
329
329
tooLongDisplayName = strings .Repeat ("亜" , 257 )
330
- prPermitted = schema .PrPermitted (random .Bool ())
331
330
testUserID = mockdata .UserID1 ()
332
331
accountType = schema .AccountType (mockdata .AccountTypesMockUserDoesntHave (testUserID )[0 ])
333
332
accountURL = random .AccountURLString (domain .AccountType (accountType ))
@@ -349,14 +348,12 @@ func TestAddUserAccount(t *testing.T) {
349
348
testUserID ,
350
349
schema.AddAccountRequest {
351
350
DisplayName : displayName ,
352
- PrPermitted : prPermitted ,
353
351
Type : accountType ,
354
352
Url : accountURL ,
355
353
},
356
354
schema.Account {
357
355
Id : uuid .Nil ,
358
356
DisplayName : displayName ,
359
- PrPermitted : prPermitted ,
360
357
Type : accountType ,
361
358
Url : accountURL ,
362
359
},
@@ -366,14 +363,12 @@ func TestAddUserAccount(t *testing.T) {
366
363
testUserID2 ,
367
364
schema.AddAccountRequest {
368
365
DisplayName : justCountDisplayName ,
369
- PrPermitted : prPermitted ,
370
366
Type : accountType2 ,
371
367
Url : accountURL2 ,
372
368
},
373
369
schema.Account {
374
370
Id : uuid .Nil ,
375
371
DisplayName : justCountDisplayName ,
376
- PrPermitted : prPermitted ,
377
372
Type : accountType2 ,
378
373
Url : accountURL2 ,
379
374
},
@@ -389,7 +384,6 @@ func TestAddUserAccount(t *testing.T) {
389
384
testUserID ,
390
385
schema.AddAccountRequest {
391
386
DisplayName : displayName ,
392
- PrPermitted : prPermitted ,
393
387
Type : accountType ,
394
388
Url : "invalid url" ,
395
389
},
@@ -400,7 +394,6 @@ func TestAddUserAccount(t *testing.T) {
400
394
testUserID ,
401
395
schema.AddAccountRequest {
402
396
DisplayName : displayName ,
403
- PrPermitted : prPermitted ,
404
397
Type : schema .AccountType (domain .AccountLimit ),
405
398
Url : accountURL ,
406
399
},
@@ -411,7 +404,6 @@ func TestAddUserAccount(t *testing.T) {
411
404
testUserID ,
412
405
schema.AddAccountRequest {
413
406
DisplayName : displayName ,
414
- PrPermitted : prPermitted ,
415
407
Type : conflictType ,
416
408
Url : random .AccountURLString (domain .AccountType (conflictType )),
417
409
},
@@ -422,7 +414,6 @@ func TestAddUserAccount(t *testing.T) {
422
414
testUserID ,
423
415
schema.AddAccountRequest {
424
416
DisplayName : tooLongDisplayName ,
425
- PrPermitted : prPermitted ,
426
417
Type : accountType ,
427
418
Url : accountURL ,
428
419
},
@@ -450,7 +441,6 @@ func TestAddUserAccount(t *testing.T) {
450
441
func TestEditUserAccount (t * testing.T ) {
451
442
var (
452
443
displayName = random .AlphaNumeric ()
453
- prPermitted = schema .PrPermitted (random .Bool ())
454
444
testAccount = mockdata .UserID1 ()
455
445
accountType = schema .AccountType (mockdata .AccountTypesMockUserHas (testAccount )[0 ])
456
446
accountURL = random .AccountURLString (domain .AccountType (accountType ))
@@ -474,7 +464,6 @@ func TestEditUserAccount(t *testing.T) {
474
464
mockdata .AccountID1 (),
475
465
schema.EditUserAccountRequest {
476
466
DisplayName : & displayName ,
477
- PrPermitted : & prPermitted ,
478
467
Type : & accountType ,
479
468
Url : & accountURL ,
480
469
},
@@ -551,7 +540,6 @@ func TestEditUserAccount(t *testing.T) {
551
540
mockdata .AccountID1 (),
552
541
schema.EditUserAccountRequest {
553
542
DisplayName : & displayName ,
554
- PrPermitted : & prPermitted ,
555
543
Type : & accountType ,
556
544
Url : & accountURL ,
557
545
},
@@ -570,13 +558,11 @@ func TestEditUserAccount(t *testing.T) {
570
558
// Insert & Assert
571
559
account = schema.Account {
572
560
DisplayName : random .AlphaNumeric (),
573
- PrPermitted : schema .PrPermitted (random .Bool ()),
574
561
Type : schema .AccountType (initialAccountType ),
575
562
Url : random .AccountURLString (initialAccountType ),
576
563
}
577
564
res := doRequest (t , e , http .MethodPost , e .URL (api .User .AddUserAccount , tt .userID ), schema.AddAccountRequest {
578
565
DisplayName : account .DisplayName ,
579
- PrPermitted : account .PrPermitted ,
580
566
Type : account .Type ,
581
567
Url : account .Url ,
582
568
})
@@ -595,9 +581,6 @@ func TestEditUserAccount(t *testing.T) {
595
581
if tt .reqBody .DisplayName != nil {
596
582
account .DisplayName = * tt .reqBody .DisplayName
597
583
}
598
- if tt .reqBody .PrPermitted != nil {
599
- account .PrPermitted = * tt .reqBody .PrPermitted
600
- }
601
584
if tt .reqBody .Type != nil {
602
585
account .Type = * tt .reqBody .Type
603
586
}
@@ -660,14 +643,12 @@ func TestDeleteUserAccount(t *testing.T) {
660
643
accountType := mockdata .AccountTypesMockUserDoesntHave (tt .userID )[0 ]
661
644
reqBody := schema.AddAccountRequest {
662
645
DisplayName : random .AlphaNumeric (),
663
- PrPermitted : schema .PrPermitted (random .Bool ()),
664
646
Type : accountType ,
665
647
Url : random .AccountURLString (domain .AccountType (accountType )),
666
648
}
667
649
res := doRequest (t , e , http .MethodPost , e .URL (api .User .AddUserAccount , tt .userID ), & reqBody )
668
650
assertResponse (t , http .StatusCreated , schema.Account {
669
651
DisplayName : reqBody .DisplayName ,
670
- PrPermitted : reqBody .PrPermitted ,
671
652
Type : reqBody .Type ,
672
653
Url : reqBody .Url ,
673
654
}, res , optSyncID , optRetrieveID (& tt .accountID ))
0 commit comments