Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
scrogson committed Sep 3, 2019
1 parent b98372a commit 207acb1
Showing 1 changed file with 51 additions and 43 deletions.
94 changes: 51 additions & 43 deletions test/user_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -23,55 +23,63 @@ defmodule UserHelper do
end

def register_user(username, password \\ "password") do
System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"register",
username,
"localhost",
password
])
IO.inspect(
System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"register",
username,
"localhost",
password
])
)
end

def unregister_user(username) do
System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"unregister",
username,
"localhost"
])
IO.inspect(
System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"unregister",
username,
"localhost"
])
)
end

def setup_presence_subscriptions(user1, user2) do
System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"add_rosteritem",
user1,
"localhost",
user2,
"localhost",
user2,
"buddies",
"both"
])
IO.inspect(
System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"add_rosteritem",
user1,
"localhost",
user2,
"localhost",
user2,
"buddies",
"both"
])
)

System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"add_rosteritem",
user2,
"localhost",
user1,
"localhost",
user1,
"buddies",
"both"
])
IO.inspect(
System.cmd("docker", [
"exec",
"ejabberd",
"ejabberdctl",
"add_rosteritem",
user2,
"localhost",
user1,
"localhost",
user1,
"buddies",
"both"
])
)
end
end

0 comments on commit 207acb1

Please sign in to comment.