From 78fbb40eda2e490da45f1eca48cbae214eecfe06 Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Fri, 15 May 2020 00:46:43 -0500 Subject: [PATCH] Need to mock auth --- .../test/fg_http_web/controllers/device_controller_test.exs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/fg_http/test/fg_http_web/controllers/device_controller_test.exs b/apps/fg_http/test/fg_http_web/controllers/device_controller_test.exs index 0b5f37b0e..351710262 100644 --- a/apps/fg_http/test/fg_http_web/controllers/device_controller_test.exs +++ b/apps/fg_http/test/fg_http_web/controllers/device_controller_test.exs @@ -20,6 +20,9 @@ defmodule FgHttpWeb.DeviceControllerTest do describe "index" do test "lists all devices", %{conn: conn} do + # Mock authentication + conn = Plug.Conn.assign(conn, :current_user, fixture(:user)) + conn = get(conn, Routes.device_path(conn, :index)) assert html_response(conn, 200) =~ "Listing Devices" end