 
   test "get/1 returns the map of messages" do
     conn = conn_with_session |> Flash.put(:notice, "hi")
-    assert Flash.get(conn) == %{notice: "hi"}
+    assert Flash.get(conn) == %{notice: ["hi"]}
   end
 
   test "get/2 returns the message by key" do

    assert Flash.get(conn, :notice) == "hi"
  end

  test "get/2 returns nil for missing key" do
    conn = conn_with_session
    assert Flash.get(conn, :notice) == nil
  end

  test "put/3 adds the key/message pair to the flash" do


    {message, conn} = Flash.pop(conn, :error)
    assert message == "oh noes!"
    assert Flash.get(conn) == %{notice: ["false alarm!"]}

    {message, conn} = Flash.pop(conn, :notice)
    assert message == "false alarm!"
    assert Flash.get(conn) == %{}
  end

  test "pop_all/3 pops all messages from the flash" do
    conn = conn_with_session
    |> Flash.put(:notices, "oh noes!")
    |> Flash.put(:notices, "false alarm!")

    {messages, conn} = Flash.pop_all(conn, :notices)
    assert messages == ["oh noes!", "false alarm!"]
    assert Flash.get(conn) == %{}
  end
end

