From 4eaebecbf2faf2a0c7d8a91a8b618286fc495482 Mon Sep 17 00:00:00 2001 From: Changaco Date: Sat, 30 Sep 2017 10:55:41 +0200 Subject: [PATCH] failing test for #705 --- tests/py/test_settings.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/tests/py/test_settings.py b/tests/py/test_settings.py index 42b7ac78a1..44b1d9065d 100644 --- a/tests/py/test_settings.py +++ b/tests/py/test_settings.py @@ -97,3 +97,21 @@ def test_too_long(self): r = self.change_username(username) assert r.code == 400 assert "The username '%s' is too long." % username in r.text, r.text + + def test_change_team_name(self): + team = self.make_participant(None, kind='group') + team.change_username('team') + alice = self.make_participant('alice') + team.add_member(alice) + bob = self.make_participant('bob') + team.add_member(bob) + r = self.client.POST('/team/settings/edit', {'username': 'Team'}, + auth_as=alice, raise_immediately=False) + assert r.code == 302 + assert r.headers[b'Location'] == b'/Team/edit' + team = team.refetch() + assert team.username == 'Team' + alice = alice.refetch() + assert alice.pending_notifs == 0 + bob = bob.refetch() + assert bob.pending_notifs == 1