0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-11-30 19:20:56 +01:00

Give the test document a filename

This commit is contained in:
Karl Hobley 2015-07-02 11:00:25 +01:00
parent 60e2d81052
commit db1aeda4af
2 changed files with 4 additions and 3 deletions

View File

@ -616,7 +616,8 @@
"model": "wagtaildocs.Document",
"fields": {
"title": "test document",
"created_at": "2014-01-01T12:00:00.000Z"
"created_at": "2014-01-01T12:00:00.000Z",
"file": "documents/test.pdf"
}
},
{

View File

@ -679,7 +679,7 @@ class TestDocumentRichTextLinkHandler(TestCase):
True
)
self.assertEqual(result,
'<a data-linktype="document" data-id="1" href="/documents/1/">')
'<a data-linktype="document" data-id="1" href="/documents/1/test.pdf">')
def test_expand_db_attributes_not_for_editor(self):
result = DocumentLinkHandler.expand_db_attributes(
@ -687,4 +687,4 @@ class TestDocumentRichTextLinkHandler(TestCase):
False
)
self.assertEqual(result,
'<a href="/documents/1/">')
'<a href="/documents/1/test.pdf">')