Skip to content

Instantly share code, notes, and snippets.

@philosodad
Created February 26, 2016 17:02
Show Gist options
  • Save philosodad/4dfd105a3b0da8786eb8 to your computer and use it in GitHub Desktop.
Save philosodad/4dfd105a3b0da8786eb8 to your computer and use it in GitHub Desktop.
pry(2)> Phoenix.ConnTest.post conn, "/customers", post: attributes
** (ArgumentError) cannot invoke @/1 outside module
(elixir) lib/kernel.ex:3960: Kernel.assert_module_scope/3
(elixir) expanding macro: Kernel.@/1
test/controllers/customers_controller_test.exs:2: (file)
(phoenix) expanding macro: Phoenix.ConnTest.post/3
test/controllers/customers_controller_test.exs:2: (file)
pry(1)> post conn(), "/customers", [username: "john", password: "doe"]
** (ArgumentError) cannot invoke @/1 outside module
(elixir) lib/kernel.ex:3960: Kernel.assert_module_scope/3
(elixir) expanding macro: Kernel.@/1
test/controllers/customers_controller_test.exs:1: (file)
(phoenix) expanding macro: Phoenix.ConnTest.post/3
test/controllers/customers_controller_test.exs:1: (file)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment