Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions test/teiserver/protocols/spring/spring_auth_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -688,17 +688,17 @@ CLIENTS test_room #{user.name}\n"
_recv_until(socket)

# Mod/Bot only so timeout to start with
_send_raw(socket, "GETIP test_user_ip_user\n")
_send_raw(socket, "GETIP test_user_ip\n")
reply = _recv_raw(socket)
assert reply == :timeout

Auth.add_roles(user.id, ["Moderator"])
:timer.sleep(500)
_recv_until(socket)

_send_raw(socket, "GETIP test_user_ip_user\n")
_send_raw(socket, "GETIP test_user_ip\n")
reply = _recv_raw(socket)
assert reply == "test_user_ip_user is currently bound to 127.0.0.1\n"
assert reply == "test_user_ip is currently bound to 127.0.0.1\n"
end

test "GETUSERID", %{user: user, socket: socket} = context do
Expand All @@ -707,17 +707,17 @@ CLIENTS test_room #{user.name}\n"
_recv_until(socket)

# Mod/Bot only so timeout to start with
_send_raw(socket, "GETUSERID test_user_id_user\n")
_send_raw(socket, "GETUSERID test_user_id\n")
reply = _recv_raw(socket)
assert reply == :timeout

Auth.add_roles(user.id, ["Moderator"])
:timer.sleep(500)
_recv_until(socket)

_send_raw(socket, "GETUSERID test_user_id_user\n")
_send_raw(socket, "GETUSERID test_user_id\n")
reply = _recv_raw(socket)
assert reply == "The ID for test_user_id_user is 1993717506 0d04a635e200f308 #{ip_user.id}\n"
assert reply == "The ID for test_user_id is 1993717506 0d04a635e200f308 #{ip_user.id}\n"
end

# test "Unicode support - TCP", %{socket: socket1, user: user} = context do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule TeiserverWeb.Live.Moderation.ActionLive.SmurfLinkTest do
# Type into the box, result table should show up
view
|> element(~s{input.user-picker-search-input})
|> render_keyup(%{value: "_user-testname"})
|> render_keyup(%{value: "_user_testname"})

# Even though our user is going to be a name match it should not
# show up
Expand All @@ -51,7 +51,7 @@ defmodule TeiserverWeb.Live.Moderation.ActionLive.SmurfLinkTest do
|> render()

assert text_field_html ==
~s(<input type="text" name="none" value="##{origin.id} - origin_user-testname" class="w-full input" placeholder="Click green button to search"/>)
~s(<input type="text" name="none" value="##{origin.id} - origin_user_testname" class="w-full input" placeholder="Click green button to search"/>)

hidden_field_html =
view
Expand Down
Loading