From 50d6de9c286abcb34ff4234d56d9cbb803db7665 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 14 Dec 2017 17:38:41 +0100 Subject: Begin moving video channel to actor --- server/tests/api/check-params/follows.ts | 18 +----------------- server/tests/api/follows.ts | 5 +---- 2 files changed, 2 insertions(+), 21 deletions(-) (limited to 'server/tests/api') diff --git a/server/tests/api/check-params/follows.ts b/server/tests/api/check-params/follows.ts index 0af1562f5..cdd2783df 100644 --- a/server/tests/api/check-params/follows.ts +++ b/server/tests/api/check-params/follows.ts @@ -184,25 +184,9 @@ describe('Test server follows API validators', function () { .expect(403) }) - it('Should fail with an undefined id', async function () { - await request(server.url) - .delete(path + '/' + undefined) - .set('Authorization', 'Bearer ' + server.accessToken) - .set('Accept', 'application/json') - .expect(400) - }) - - it('Should fail with an invalid id', async function () { - await request(server.url) - .delete(path + '/foobar') - .set('Authorization', 'Bearer ' + server.accessToken) - .set('Accept', 'application/json') - .expect(400) - }) - it('Should fail we do not follow this server', async function () { await request(server.url) - .delete(path + '/-1') + .delete(path + '/example.com') .set('Authorization', 'Bearer ' + server.accessToken) .set('Accept', 'application/json') .expect(404) diff --git a/server/tests/api/follows.ts b/server/tests/api/follows.ts index dcb4c8bd9..10eb48969 100644 --- a/server/tests/api/follows.ts +++ b/server/tests/api/follows.ts @@ -23,7 +23,6 @@ const expect = chai.expect describe('Test follows', function () { let servers: ServerInfo[] = [] - let server3Id: number before(async function () { this.timeout(20000) @@ -82,8 +81,6 @@ describe('Test follows', function () { expect(server3Follow).to.not.be.undefined expect(server2Follow.state).to.equal('accepted') expect(server3Follow.state).to.equal('accepted') - - server3Id = server3Follow.following.id }) it('Should have 0 followings on server 1 and 2', async function () { @@ -121,7 +118,7 @@ describe('Test follows', function () { it('Should unfollow server 3 on server 1', async function () { this.timeout(5000) - await unfollow(servers[0].url, servers[0].accessToken, server3Id) + await unfollow(servers[0].url, servers[0].accessToken, servers[2]) await wait(3000) }) -- cgit v1.2.3