Skip to content

Commit

Permalink
failing test for #705
Browse files Browse the repository at this point in the history
  • Loading branch information
Changaco committed Sep 30, 2017
1 parent 2588ba7 commit 4eaebec
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/py/test_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 4eaebec

Please sign in to comment.