     {:ok, %{user: user}}
   end
 
+  test "index" do
+    conn =
+      :get
+      |> call("#{@fp_url}")
+      |> with_user
+      |> send_request
+
+    assert html_response(conn, 200) =~ "Index - frontpage photos"
+  end
+
   test "new" do
     conn =
       :get

    assert html_response(conn, 200) =~ "Delete frontpage photo"
  end

  test "delete"do
    fp_photo = Factory.create(:frontpage_photo)

    conn =

    assert redirected_to(conn, 302) =~ @portfolio_url
  end

  test "create (post) w/broken params", %{user: user} do
    fp_photo_params = %{"photo" => nil}

    conn =
      :post
      |> call("#{@fp_url}/", %{"frontpage_photo" => fp_photo_params})
      |> with_user(user)
      |> send_request

    assert html_response(conn, 200) =~ "New frontpage photo"
    assert get_flash(conn, :error) == "Errors in form"
  end

  test "update (post) w/params", %{user: user} do
    fp_photo = Factory.create(:frontpage_photo)
    fp_photo_params = %{"photo" => @up_params2}

    conn =
      :patch
