From 4bdfda5ef71b4085b75a96328783376276109c1f Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 12 Nov 2018 23:36:51 +0100 Subject: [PATCH] Fix tests Signed-off-by: Thomas Citharel --- lib/mobilizon_web/resolvers/event.ex | 4 ++-- .../20180628142835_revert_alter_event_timestamps.exs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/mobilizon_web/resolvers/event.ex b/lib/mobilizon_web/resolvers/event.ex index 719b3c445..df8e55f61 100644 --- a/lib/mobilizon_web/resolvers/event.ex +++ b/lib/mobilizon_web/resolvers/event.ex @@ -64,8 +64,8 @@ defmodule MobilizonWeb.Resolvers.Event do end def create_event(_parent, args, %{context: %{current_user: user}}) do - organizer_actor_id = Map.get(args, "organizer_actor_id") || Actors.get_actor_for_user(user).id - args = args |> Map.put("organizer_actor_id", organizer_actor_id) + organizer_actor_id = Map.get(args, :organizer_actor_id) || Actors.get_actor_for_user(user).id + args = args |> Map.put(:organizer_actor_id, organizer_actor_id) Mobilizon.Events.create_event(args) end diff --git a/priv/repo/migrations/20180628142835_revert_alter_event_timestamps.exs b/priv/repo/migrations/20180628142835_revert_alter_event_timestamps.exs index 6fbf5958f..256ad42c4 100644 --- a/priv/repo/migrations/20180628142835_revert_alter_event_timestamps.exs +++ b/priv/repo/migrations/20180628142835_revert_alter_event_timestamps.exs @@ -1,15 +1,15 @@ -defmodule Mobilizon.Repo.Migrations.AlterEventTimestampsToDateTimeWithTimeZone do +defmodule Mobilizon.Repo.Migrations.RevertAlterEventTimestampsToDateTimeWithTimeZone do use Ecto.Migration def up do - alter table("events") do + alter table(:events) do modify :inserted_at, :timestamptz modify :updated_at, :timestamptz end end def down do - alter table("events") do + alter table(:events) do modify :inserted_at, :utc_datetime modify :updated_at, :utc_datetime end