summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-10 16:49:34 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-10 16:49:34 +0100
commit53d0f69dc3b4a3f19f9e48c63a5dbc704b944c0c (patch)
treea57eb6a74799e6dc6d71431990195732ec6f70c2 /tests
parentTiny trivial PoC unit-test using SQLite in :memory: mode (diff)
downloadsynapse-53d0f69dc3b4a3f19f9e48c63a5dbc704b944c0c.tar.xz
Also test avatar_url profile field
Diffstat (limited to 'tests')
-rw-r--r--tests/storage/test_profile.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/storage/test_profile.py b/tests/storage/test_profile.py
index fff0a8c4fd..bca056b295 100644
--- a/tests/storage/test_profile.py
+++ b/tests/storage/test_profile.py
@@ -76,3 +76,17 @@ class ProfileStoreTestCase(unittest.TestCase):
         name = yield self.store.get_profile_displayname(self.u_frank.localpart)
 
         self.assertEquals("Frank", name)
+
+    @defer.inlineCallbacks
+    def test_avatar_url(self):
+        yield self.store.create_profile(
+            self.u_frank.localpart
+        )
+
+        yield self.store.set_profile_avatar_url(
+                self.u_frank.localpart, "http://my.site/here"
+        )
+
+        name = yield self.store.get_profile_avatar_url(self.u_frank.localpart)
+
+        self.assertEquals("http://my.site/here", name)