summaryrefslogtreecommitdiff
path: root/test/polyjuice/client_test.exs
diff options
context:
space:
mode:
Diffstat (limited to 'test/polyjuice/client_test.exs')
-rw-r--r--test/polyjuice/client_test.exs17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/polyjuice/client_test.exs b/test/polyjuice/client_test.exs
index c516096..089c97f 100644
--- a/test/polyjuice/client_test.exs
+++ b/test/polyjuice/client_test.exs
@@ -423,4 +423,21 @@ defmodule Polyjuice.ClientTest do
File.rm_rf(tmpdir)
end
end
+
+ test "gets the user and device IDs" do
+ {:ok, client_pid} =
+ Polyjuice.Client.start_link(
+ "",
+ access_token: nil,
+ sync: false,
+ handler: self(),
+ test: true,
+ user_id: "@alice:example.org",
+ device_id: "DEVICEID"
+ )
+
+ client = Polyjuice.Client.get_client(client_pid)
+
+ assert Polyjuice.Client.API.get_user_and_device(client) == {"@alice:example.org", "DEVICEID"}
+ end
end