diff options
Diffstat (limited to 'server/tests/api/users/user-subscriptions.ts')
-rw-r--r-- | server/tests/api/users/user-subscriptions.ts | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/server/tests/api/users/user-subscriptions.ts b/server/tests/api/users/user-subscriptions.ts index b49367be6..d1d192238 100644 --- a/server/tests/api/users/user-subscriptions.ts +++ b/server/tests/api/users/user-subscriptions.ts | |||
@@ -390,6 +390,8 @@ describe('Test users subscriptions', function () { | |||
390 | }) | 390 | }) |
391 | 391 | ||
392 | expect(total).to.equal(3) | 392 | expect(total).to.equal(3) |
393 | expect(data).to.have.lengthOf(3) | ||
394 | |||
393 | expect(data[0].following.host).to.equal(servers[2].host) | 395 | expect(data[0].following.host).to.equal(servers[2].host) |
394 | expect(data[0].following.name).to.equal('user3_channel') | 396 | expect(data[0].following.name).to.equal('user3_channel') |
395 | expect(data[0].follower.host).to.equal(servers[0].host) | 397 | expect(data[0].follower.host).to.equal(servers[0].host) |
@@ -416,6 +418,8 @@ describe('Test users subscriptions', function () { | |||
416 | }) | 418 | }) |
417 | 419 | ||
418 | expect(total).to.equal(3) | 420 | expect(total).to.equal(3) |
421 | expect(data).to.have.lengthOf(1) | ||
422 | |||
419 | expect(data[0].following.host).to.equal(servers[2].host) | 423 | expect(data[0].following.host).to.equal(servers[2].host) |
420 | expect(data[0].following.name).to.equal('user3_channel2') | 424 | expect(data[0].following.name).to.equal('user3_channel2') |
421 | expect(data[0].follower.host).to.equal(servers[2].host) | 425 | expect(data[0].follower.host).to.equal(servers[2].host) |
@@ -432,6 +436,8 @@ describe('Test users subscriptions', function () { | |||
432 | }) | 436 | }) |
433 | 437 | ||
434 | expect(total).to.equal(3) | 438 | expect(total).to.equal(3) |
439 | expect(data).to.have.lengthOf(1) | ||
440 | |||
435 | expect(data[0].following.host).to.equal(servers[2].host) | 441 | expect(data[0].following.host).to.equal(servers[2].host) |
436 | expect(data[0].following.name).to.equal('user3_channel') | 442 | expect(data[0].following.name).to.equal('user3_channel') |
437 | expect(data[0].follower.host).to.equal(servers[2].host) | 443 | expect(data[0].follower.host).to.equal(servers[2].host) |
@@ -447,6 +453,8 @@ describe('Test users subscriptions', function () { | |||
447 | }) | 453 | }) |
448 | 454 | ||
449 | expect(total).to.equal(1) | 455 | expect(total).to.equal(1) |
456 | expect(data).to.have.lengthOf(1) | ||
457 | |||
450 | expect(data[0].following.host).to.equal(servers[2].host) | 458 | expect(data[0].following.host).to.equal(servers[2].host) |
451 | expect(data[0].following.name).to.equal('user3_channel') | 459 | expect(data[0].following.name).to.equal('user3_channel') |
452 | expect(data[0].follower.host).to.equal(servers[0].host) | 460 | expect(data[0].follower.host).to.equal(servers[0].host) |
@@ -465,6 +473,8 @@ describe('Test users subscriptions', function () { | |||
465 | }) | 473 | }) |
466 | 474 | ||
467 | expect(total).to.equal(2) | 475 | expect(total).to.equal(2) |
476 | expect(data).to.have.lengthOf(2) | ||
477 | |||
468 | expect(data[0].following.host).to.equal(servers[2].host) | 478 | expect(data[0].following.host).to.equal(servers[2].host) |
469 | expect(data[0].following.name).to.equal('user3_channel') | 479 | expect(data[0].following.name).to.equal('user3_channel') |
470 | expect(data[0].follower.host).to.equal(servers[0].host) | 480 | expect(data[0].follower.host).to.equal(servers[0].host) |
@@ -486,6 +496,8 @@ describe('Test users subscriptions', function () { | |||
486 | }) | 496 | }) |
487 | 497 | ||
488 | expect(total).to.equal(2) | 498 | expect(total).to.equal(2) |
499 | expect(data).to.have.lengthOf(1) | ||
500 | |||
489 | expect(data[0].following.host).to.equal(servers[2].host) | 501 | expect(data[0].following.host).to.equal(servers[2].host) |
490 | expect(data[0].following.name).to.equal('user3_channel') | 502 | expect(data[0].following.name).to.equal('user3_channel') |
491 | expect(data[0].follower.host).to.equal(servers[2].host) | 503 | expect(data[0].follower.host).to.equal(servers[2].host) |
@@ -502,10 +514,12 @@ describe('Test users subscriptions', function () { | |||
502 | }) | 514 | }) |
503 | 515 | ||
504 | expect(total).to.equal(2) | 516 | expect(total).to.equal(2) |
517 | expect(data).to.have.lengthOf(1) | ||
518 | |||
505 | expect(data[0].following.host).to.equal(servers[2].host) | 519 | expect(data[0].following.host).to.equal(servers[2].host) |
506 | expect(data[0].following.name).to.equal('user3_channel') | 520 | expect(data[0].following.name).to.equal('user3_channel') |
507 | expect(data[0].follower.host).to.equal(servers[0].host) | 521 | expect(data[0].follower.host).to.equal(servers[0].host) |
508 | expect(data[0].follower.name).to.equal('root') | 522 | expect(data[0].follower.name).to.equal('user1') |
509 | } | 523 | } |
510 | 524 | ||
511 | { | 525 | { |
@@ -517,6 +531,8 @@ describe('Test users subscriptions', function () { | |||
517 | }) | 531 | }) |
518 | 532 | ||
519 | expect(total).to.equal(1) | 533 | expect(total).to.equal(1) |
534 | expect(data).to.have.lengthOf(1) | ||
535 | |||
520 | expect(data[0].following.host).to.equal(servers[2].host) | 536 | expect(data[0].following.host).to.equal(servers[2].host) |
521 | expect(data[0].following.name).to.equal('user3_channel') | 537 | expect(data[0].following.name).to.equal('user3_channel') |
522 | expect(data[0].follower.host).to.equal(servers[0].host) | 538 | expect(data[0].follower.host).to.equal(servers[0].host) |