From d5326772d75e2c0b6b465888eedddce7b10314c7 Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Fri, 19 Jul 2019 19:12:15 +0200 Subject: [PATCH] [Tests] Check if crash if null --- test/MxContent_test.dart | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/MxContent_test.dart b/test/MxContent_test.dart index cfdc5ca2..8f4905a5 100644 --- a/test/MxContent_test.dart +++ b/test/MxContent_test.dart @@ -43,5 +43,12 @@ void main() { width: 50, height: 50, method: ThumbnailMethod.scale), "${client.homeserver}/_matrix/media/r0/thumbnail/exampleserver.abc/abcdefghijklmn?width=50&height=50&method=scale"); }); + test("Not crashing if null", () async { + Client client = Client("testclient"); + client.homeserver = "https://testserver.abc"; + final MxContent content = MxContent(null); + expect(content.getDownloadLink(client), + "${client.homeserver}/_matrix/media/r0/download/"); + }); }); }