From 81a41ffffb5d6fb63208ec298c15546f25931f2d Mon Sep 17 00:00:00 2001 From: Theresa Gresch Date: Fri, 9 Aug 2019 16:02:00 +0200 Subject: [PATCH] Remove unnecessary test from album model test --- frontend/tests/unit/model/album_test.js | 26 +++++-------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/frontend/tests/unit/model/album_test.js b/frontend/tests/unit/model/album_test.js index 68aeddfc7..5dd0863a8 100644 --- a/frontend/tests/unit/model/album_test.js +++ b/frontend/tests/unit/model/album_test.js @@ -1,14 +1,14 @@ import assert from "assert"; import Album from "model/album"; -import Api from "common/api"; import MockAdapter from "axios-mock-adapter"; +import Api from "common/api"; + const mock = new MockAdapter(Api); -const postLikeEntity = [ - {id: 5, AlbumFavorite: true}, -]; -mock.onPost("foo").reply(201, postLikeEntity); +mock + .onPost().reply(200) + .onDelete().reply(200); describe("model/album", () => { it("should get album entity name", () => { @@ -96,20 +96,4 @@ describe("model/album", () => { album.toggleLike(); assert.equal(album.AlbumFavorite, true); }); - - it("should toggle like", () => { - Api.post('foo', postLikeEntity).then( - (response) => { - assert.equal(201, response.status); - assert.deepEqual(postLikeEntity, response.data); - done(); - } - ).catch( - (error) => { - done(error); - } - ); - }); - - }); \ No newline at end of file