I defined a custom route in my router like this
get("/user/actions", UserController, :user_actions, as: :user_actions)
And in my controller the method is defined like this:
def user_actions(conn, _params) do
code logic here
end
And in my test .I wrote test like this:
test "render current users actions", %{conn: conn} do
get(conn, user_actions_path(conn, :user_actions))
|> json_response(200)
end
The test case fails with this message:
** (UndefinedFunctionError) function App.UserController.user_actions/4 is undefined or private
I don’t get it. why its saying my function has an arity of 4.
May be I am missing something very basic here.
Thanks