From 287a55db9f7c03dba4646b6f7499aea27ef99c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=A4fer?= Date: Tue, 7 May 2019 14:10:12 +0200 Subject: [PATCH] Remove test case entirely @ulfgebhardt when I write "Remove test case" I mean indeed removing all the lines of code of that test case, not only disabling it. Commenting out code *and pushing it to version control* is a strong anti-pattern. Why? First, code comments get out of date quickly. "Never trust code comments". Second: In our example here, it creates anxiety because other contributors might believe there was a reason why the commented code exists. Read: * https://blog.codinghorror.com/coding-without-comments/ * https://www.nayuki.io/page/dont-share-commented-out-code * https://softwareengineering.stackexchange.com/questions/1/comments-are-a-code-smell --- backend/src/middleware/userMiddleware.spec.js | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/backend/src/middleware/userMiddleware.spec.js b/backend/src/middleware/userMiddleware.spec.js index 4bc0d0cd6..6570f5510 100644 --- a/backend/src/middleware/userMiddleware.spec.js +++ b/backend/src/middleware/userMiddleware.spec.js @@ -33,25 +33,8 @@ describe('userMiddleware', () => { await expect(client.request(mutation, variables)) .resolves.toEqual(expected) }) - - // TODO rethink how and if the user can specify its id - // are there rules for this? - // For more info see: https://github.com/Human-Connection/Human-Connection/pull/478#discussion_r280530171 - /* it('with ID, email and password', async () => { - const variables = { - password: '123', - id: 'u1', - email: '123@123.de' - } - const expected = { - CreateUser: { - id: 'u1' - } - } - await expect(client.request(mutation, variables)) - .resolves.toEqual(expected) - }) */ }) + describe('update User', () => { const mutation = ` mutation($id: ID!, $name: String) {