Last active
May 5, 2016 06:09
-
-
Save Fadhil/c9f540ce5f2d0cee53941e23cfdea1f9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Plug.AnonymousTest do | |
use ExUnit.Case, async: true | |
use Plug.Test | |
require IEx | |
alias Plug.AnonymousSessionStore | |
test "assigns user_id session key" do | |
# opts = Anonymous.init([]) | |
conn = conn(:get, "/") |> fetch_session | |
IEx.pry | |
# conn = Anonymous.call(conn, opts) |> fetch_session | |
# [user_session_id] = Regex.run(~r/^\w*/, get_session(conn, :user_id)) | |
# refute "" = user_session_id | |
# refute nil = user_session_id | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment