Mercurial > kallithea
diff rhodecode/tests/functional/test_admin_gists.py @ 3846:2576a20d94ca beta
Gist: don't allow files inside directories when creating gists
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 12 May 2013 00:41:38 +0200 |
parents | ec64c396da8c |
children | b4fc29a051ae |
line wrap: on
line diff
--- a/rhodecode/tests/functional/test_admin_gists.py Sun May 12 00:26:47 2013 +0200 +++ b/rhodecode/tests/functional/test_admin_gists.py Sun May 12 00:41:38 2013 +0200 @@ -75,6 +75,16 @@ response.mustcontain('gist test') response.mustcontain('<div class="ui-btn green badge">Public gist</div>') + def test_create_with_path_with_dirs(self): + self.log_user() + response = self.app.post(url('gists'), + params={'lifetime': -1, + 'content': 'gist test', + 'filename': '/home/foo', + 'public': 'public'}, + status=200) + response.mustcontain('Filename cannot be inside a directory') + def test_access_expired_gist(self): self.log_user() gist = _create_gist('never-see-me')