defmodule TestUtils do
  def app(path) do
    "http://localhost:#{Cobalt.Dynamo.config[:server][:port]}/#{path}"
  end


  def truncate_db_after_test do
    table_names = ["users", "messages", "rooms"]
    sql = "TRUNCATE TABLE #{Enum.join(table_names, ", ")} RESTART IDENTITY CASCADE;"
    Repo.adapter.query(Repo, sql)
  end
end
Add TestUtils with functions to truncate db and app path
Add TestUtils with functions to truncate db and app path

di-stars/mogo-chat,louishawkins/mogo-chat,sashafklein/bloc-mogo,louishawkins/mogo-chat,HashNuke/mogo-chat,HashNuke/mogo-chat,sashafklein/bloc-mogo,sashafklein/bloc-mogo,di-stars/mogo-chat,di-stars/mogo-chat,HashNuke/mogo-chat,louishawkins/mogo-chat