Update test_create_link to test against a URL with a trailing slash

This means that our test is no longer implicitly depending on a Django quirk that was removed in 1.8: https://docs.djangoproject.com/en/1.8/releases/1.8/#miscellaneous "URLField.to_python no longer adds a trailing slash to pathless URLs."
This commit is contained in:
Matt Westcott 2015-04-13 18:43:06 +01:00
parent e32e050b30
commit 2abe269b75

View file

@ -101,7 +101,7 @@ class TestChooserExternalLink(TestCase, WagtailTestUtils):
self.assertEqual(self.get({'prompt_for_link_text': 'foo'}).status_code, 200)
def test_create_link(self):
response = self.post({'url': 'http://www.example.com'})
response = self.post({'url': 'http://www.example.com/'})
self.assertEqual(response.status_code, 200)
self.assertContains(response, "'onload'") # indicates success / post back to calling page
self.assertContains(response, "'url': 'http://www.example.com/',")