diff options
| author | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-24 19:56:27 +0300 |
|---|---|---|
| committer | Alexander Strizhakov <alex.strizhakov@gmail.com> | 2020-02-24 19:56:27 +0300 |
| commit | 8efae966b1e87fe448a13d04eae0898c4a102c29 (patch) | |
| tree | 9c2cb158991e7ac582a9e6b4e2979016ec3a4428 /test/gun | |
| parent | d44f9e3b6cfd5a0dae07f6194bfd05360afd6560 (diff) | |
| download | pleroma-8efae966b1e87fe448a13d04eae0898c4a102c29.tar.gz pleroma-8efae966b1e87fe448a13d04eae0898c4a102c29.zip | |
open conn in separate task
Diffstat (limited to 'test/gun')
| -rw-r--r-- | test/gun/gun_test.exs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/gun/gun_test.exs b/test/gun/gun_test.exs index 7f185617c..9f3e0f938 100644 --- a/test/gun/gun_test.exs +++ b/test/gun/gun_test.exs @@ -19,6 +19,12 @@ defmodule Pleroma.GunTest do assert json = receive_response(conn, ref) assert %{"args" => %{"a" => "b", "c" => "d"}} = Jason.decode!(json) + + {:ok, pid} = Task.start(fn -> Process.sleep(50) end) + + :ok = :gun.set_owner(conn, pid) + + assert :gun.info(conn).owner == pid end defp receive_response(conn, ref, acc \\ "") do |
