Improve and extend profile editing tests
authorSebastian Spaeth <Sebastian@SSpaeth.de>
Tue, 8 Jan 2013 09:24:10 +0000 (10:24 +0100)
committerSebastian Spaeth <Sebastian@SSpaeth.de>
Wed, 9 Jan 2013 08:56:53 +0000 (09:56 +0100)
commita3b98853df71a00d8aba0d641ee57a265238d95e
tree656681023db32e68e744c701b81ca86366d9c4e1
parentabc4da2927be02fb21d2f2bd1effea7b5ee6b9c7
Improve and extend profile editing tests

We only ever ran the password changing test here, and not the
half-existing test for changing the bio and homepage.

Fix the tests to actually run both tests. We check that setting bio and
homepage to a valid value works as expected. We also test for invalid
bio (too long) and invalid URLs setting fails. (which is what we want).

- Check that the old /edit/profile/ address redirects to /u/USER/edit/.
- Check that /u/USER/edit/ works as expected
- Check that /u/OTHERUSER/edit/ fails with a 403 Forbidden error when we
  are not logged in as that user. The last remaining test that would be
  useful is to make a user an admin and make sure the admin can edit
  other users' profiles.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
mediagoblin/tests/test_edit.py