This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added test for invalid character in team names.
- Loading branch information
1 parent
767a6ca
commit 34abe3a
Showing
1 changed file
with
8 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,6 +296,14 @@ def test_error_message_for_bad_url(self): | |
r = self.post_new(dict(self.valid_data, todo_url='foo'), expected=400) | ||
assert "Please enter an http[s]:// URL for the 'To-do URL' field." in r.body | ||
|
||
def test_error_message_for_invalid_team_name(self): | ||
self.make_participant('alice', claimed_time='now', email_address='[email protected]', last_paypal_result='') | ||
data = dict(self.valid_data) | ||
data['name'] = '~Invalid:Name;' | ||
r = self.post_new(data, expected=400) | ||
assert self.db.one("SELECT COUNT(*) FROM teams") == 0 | ||
assert "Sorry, team name contains invalid characters." in r.body | ||
|
||
def test_error_message_for_slug_collision(self): | ||
self.make_participant('alice', claimed_time='now', email_address='[email protected]', last_paypal_result='') | ||
self.post_new(dict(self.valid_data)) | ||
|