From 4a5ad26fe6fc67eee473ab09d4bb802be6ecd4d7 Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Tue, 25 May 2021 23:54:16 +0200 Subject: [PATCH] Fix unit tests --- .../src/graphql/gql/mutations/updateTeam.gql | 1 + server/users/tests/test_teams.py | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/client/src/graphql/gql/mutations/updateTeam.gql b/client/src/graphql/gql/mutations/updateTeam.gql index d3f74c42..76877dc9 100644 --- a/client/src/graphql/gql/mutations/updateTeam.gql +++ b/client/src/graphql/gql/mutations/updateTeam.gql @@ -2,6 +2,7 @@ mutation UpdateTeam($input: UpdateTeamInput!) { updateTeam(input: $input) { success team { + id name } } diff --git a/server/users/tests/test_teams.py b/server/users/tests/test_teams.py index 8354ec9c..1a2a16f5 100644 --- a/server/users/tests/test_teams.py +++ b/server/users/tests/test_teams.py @@ -20,8 +20,22 @@ ME_QUERY = """ } """ -CREATE_TEAM_MUTATION = get_graphql_mutation('createTeam.gql') -JOIN_TEAM_MUTATION = get_graphql_mutation('joinTeam.gql') +TEAM_PARTS = """ +fragment TeamParts on TeamNode { + name + code + id + members { + firstName + lastName + id + isMe + } +} +""" + +CREATE_TEAM_MUTATION = TEAM_PARTS + get_graphql_mutation('createTeam.gql') +JOIN_TEAM_MUTATION = TEAM_PARTS + get_graphql_mutation('joinTeam.gql') UPDATE_TEAM_MUTATION = get_graphql_mutation('updateTeam.gql') LEAVE_TEAM_MUTATION = get_graphql_mutation('me/leaveTeam.gql')