Commit 32d8e896 authored by Frank Rousseau's avatar Frank Rousseau
Browse files

Fix credo issues

parent 675c073c
defmodule Gaja.Web.TrackersChannel do
@moduledoc false
use Gaja.Web, :channel
def join("trackers:room", payload, socket) do
......
defmodule Gaja.ReleaseTasks do
@moduledoc false
@start_apps [
:crypto,
:ssl,
......@@ -47,15 +49,15 @@ defmodule Gaja.ReleaseTasks do
end
defp run_db_create do
Enum.each(@repos, &run_db_create_for/1)
Enum.each(@repos, &run_db_create_for/1)
end
defp run_db_create_for(repo) do
case repo.__adapter__.storage_up(repo.config) do
case repo.__adapter__.storage_up(repo.config) do
:ok ->
IO.puts "The database for #{inspect repo} has been created"
IO.puts "The database for #{inspect repo} has been created"
{:error, :already_up} ->
IO.puts "The database for #{inspect repo} has already been created"
IO.puts "The database for #{inspect repo} has already been created"
{:error, term} when is_binary(term) ->
IO.puts "The database for #{inspect repo} couldn't be created: #{term}"
{:error, term} ->
......@@ -64,7 +66,7 @@ defmodule Gaja.ReleaseTasks do
end
defp run_migrations do
Enum.each(@repos, &run_migrations_for/1)
Enum.each(@repos, &run_migrations_for/1)
end
defp run_migrations_for(repo) do
......
......@@ -3,7 +3,8 @@ defmodule GajaWeb.TrackersChannelTest do
setup do
{:ok, _, socket} =
socket(GajaWeb.UserSocket, "user_id", %{some: :assign})
GajaWeb.UserSocket
|> "user_id", %{some: :assign})
|> subscribe_and_join(GajaWeb.TrackersChannel, "trackers:lobby")
{:ok, socket: socket}
......
......@@ -33,9 +33,9 @@ defmodule Gaja.Web.TrackerEntryControllerTest do
@tag login: "bill@example.com"
test "between given dates", %{conn: conn, tracker: tracker} do
attrs = %{ value: 2, date: "2019-06-01T00:00:00" }
attrs = %{value: 2, date: "2019-06-01T00:00:00"}
TrackerEntries.create_tracker_entry(tracker, attrs)
attrs = %{ value: 5, date: "2019-07-01T00:00:00" }
attrs = %{value: 5, date: "2019-07-01T00:00:00"}
{:ok, tracker_entry} = TrackerEntries.create_tracker_entry(
tracker,
attrs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment