summary refs log tree commit diff
path: root/tests/rest/media
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2019-07-03 04:01:28 +1000
committerRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2019-07-02 19:01:28 +0100
commit0ee9076ffe40140db5e86763af077efbdb5d86b0 (patch)
treeacab7d2c00d9daeaf45e7c5eeee9e6cf1f8f60af /tests/rest/media
parenttweak changelog (diff)
downloadsynapse-0ee9076ffe40140db5e86763af077efbdb5d86b0.tar.xz
Fix media repo breaking (#5593)
Diffstat (limited to 'tests/rest/media')
-rw-r--r--tests/rest/media/v1/test_url_preview.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/rest/media/v1/test_url_preview.py b/tests/rest/media/v1/test_url_preview.py
index 8fe5961866..976652aee8 100644
--- a/tests/rest/media/v1/test_url_preview.py
+++ b/tests/rest/media/v1/test_url_preview.py
@@ -460,3 +460,15 @@ class URLPreviewTests(unittest.HomeserverTestCase):
                 "error": "DNS resolution failure during URL preview generation",
             },
         )
+
+    def test_OPTIONS(self):
+        """
+        OPTIONS returns the OPTIONS.
+        """
+        request, channel = self.make_request(
+            "OPTIONS", "url_preview?url=http://example.com", shorthand=False
+        )
+        request.render(self.preview_url)
+        self.pump()
+        self.assertEqual(channel.code, 200)
+        self.assertEqual(channel.json_body, {})