     end)
   end
 
-  test "index shows styles tab", %{conn: conn} do
-    conn = get(conn, page_path(conn, :index))
+  test "index shows styles tab" do
+    conn = index()
 
     assert html_response(conn, 200) =~ "Styles"
   end
 
-  test "index shows About link", %{conn: conn} do
-    conn = get(conn, page_path(conn, :index))
+  test "index shows About link" do
+    conn = index()
 
     assert html_response(conn, 200) =~ "About"
     assert html_response(conn, 200) =~ page_path(conn, :about)
   end
 
   test "index shows the GitHub link" do
-    conn = build_conn()
-    conn = get(conn, page_path(conn, :index))
+    conn = index()
 
     assert html_response(conn, 200) =~ "https://github.com/lee-dohm/atom-style-tweaks"
   end
 
-  test "about page shows some about text", %{conn: conn} do
-    conn = get(conn, page_path(conn, :about))
+  test "about page shows some about text" do
+    conn = about()
 
     assert html_response(conn, 200) =~ "About Atom Tweaks"
   end

  require Logger
  import AtomStyleTweaks.Factory

  def index do
    conn = build_conn()

    get(conn, page_path(conn, :index))
  end

  def index(:logged_in) do
    conn = build_conn()
    user = build(:user)
    conn = init_test_session(conn, %{current_user: user})

    get(conn, page_path(conn, :index))
  end

  test "index shows home page link" do
    conn = index()

  end

  test "index shows a list of tweaks" do
    styles = insert_list(3, :style)
    conn = index()

    Enum.each(styles, fn(style) ->
      assert html_response(conn, 200) =~ style.title
