     posts = [
       "Controllers",
       "Views",
-      "Templates",
+      "Templates"
     ]
 
     Factory.insert!(:channel, name: "phoenix")
 
     posts
-    |> Enum.with_index
-    |> Enum.each(fn({title, likes}) ->
+    |> Enum.with_index()
+    |> Enum.each(fn {title, likes} ->
       Factory.insert!(:post, title: title, likes: likes + 1)
     end)
 

    visit(session, "/statistics")
    activity_tag = find(session, Query.css("ul#activity"))

    find(activity_tag,
         Query.css("li[data-amount='1'][data-date='Mon, #{Timex.format!(previous_monday, "%b %-e", :strftime)}']")
       )
    find(activity_tag,
         Query.css("li[data-amount='2'][data-date='Tue, #{Timex.format!(previous_tuesday, "%b %-e", :strftime)}']")
       )
    find(activity_tag,
         Query.css("li[data-amount='3'][data-date='Wed, #{Timex.format!(previous_wednesday, "%b %-e", :strftime)}']")
        )
  end

  test "sees total number of posts by developer", %{session: session} do

    developer = Factory.insert!(:developer, username: "makinpancakes")
    Factory.insert!(:post, developer: developer)


  end

  test "sees total number of posts by channel", %{session: session} do
    target_channel = Factory.insert!(:channel, name: "phoenix")
    other_channel = Factory.insert!(:channel, name: "other")

    Factory.insert!(:post, title: "functional programming rocks", channel: target_channel)

    Enum.each(["i'm fine", "all these people out here", "what?"], fn title ->
      Factory.insert!(:post, title: title, channel: other_channel)
    end)

