   require Logger
   import AtomStyleTweaks.Factory
 
-  def index do
+  def get_page(path_fn, options)
+
+  def get_page(path_fn, nil) do
     conn = build_conn()
 
-    get(conn, page_path(conn, :index))
+    get(conn, path_fn.(conn))
   end
 
-  def index(:logged_in) do
+  def get_page(path_fn, :logged_in) do
     conn = build_conn()
     user = build(:user)
     conn = init_test_session(conn, %{current_user: user})
 
-    get(conn, page_path(conn, :index))
+    get(conn, path_fn.(conn))
   end
+
+  def index(options \\ nil)
+  def index(options), do: get_page(&(page_path(&1, :index)), options)
+
+  def about(options \\ nil)
+  def about(options), do: get_page(&(page_path(&1, :about)), options)
 
   test "index shows home page link" do
     conn = index()

    end)
  end

  test "index shows styles tab", %{conn: conn} do
    conn = get(conn, page_path(conn, :index))

    assert html_response(conn, 200) =~ "Styles"
  end

  test "index shows About link", %{conn: conn} do
    conn = get(conn, page_path(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))

    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))

    assert html_response(conn, 200) =~ "About Atom Tweaks"
  end

  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
