Commit c14196b5 authored by Michal Čihař's avatar Michal Čihař

Test error paths in adding new language

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 4824223a
......@@ -309,6 +309,28 @@ class NewLangTest(ViewTestCase):
).exists()
)
# Not selected language
response = self.client.post(
reverse('new-language', kwargs=self.kw_subproject),
{'lang': ''},
follow=True
)
self.assertContains(
response,
'Please choose the language'
)
# Existing language
response = self.client.post(
reverse('new-language', kwargs=self.kw_subproject),
{'lang': 'af'},
follow=True
)
self.assertContains(
response,
'Chosen translation already exists'
)
class AndroidNewLangTest(NewLangTest):
def create_subproject(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment