diff options
author | 2018-07-04 12:38:11 +0200 | |
---|---|---|
committer | 2018-07-09 01:23:18 +0200 | |
commit | d07ad6aa4091c318dc62ac41975ef0590ce11f2c (patch) | |
tree | 978ec4e78bf1968310cd2cfaf6936ddf8e08d01f /tests | |
parent | Remove space from end of `JAMMERS_ROLE` id in constants.py (diff) |
Allow numbers in channel names.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_api_bot_off_topic_names.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/test_api_bot_off_topic_names.py b/tests/test_api_bot_off_topic_names.py index 4c9c782b..74146bc5 100644 --- a/tests/test_api_bot_off_topic_names.py +++ b/tests/test_api_bot_off_topic_names.py @@ -36,7 +36,7 @@ class AddingANameOffTopicEndpointTests(SiteTest): self.assert200(response) -class AddingChannelNameToDatabaseEndpointTests(SiteTest): +class AddingChannelNamesToDatabaseEndpointTests(SiteTest): """Tests fetching names from the database with GET.""" CHANNEL_NAME = 'bisks-disks' @@ -58,6 +58,14 @@ class AddingChannelNameToDatabaseEndpointTests(SiteTest): self.assert200(response) self.assertIn(self.CHANNEL_NAME, response.json) + def test_allows_numbers_in_names(self): + response = self.client.post( + f'/bot/off-topic-names?name=totallynot42', + app.config['API_SUBDOMAIN'], + headers=app.config['TEST_HEADER'] + ) + self.assert200(response) + class RandomSampleEndpointTests(SiteTest): """Tests fetching random names from the website with GET.""" |