Skip to content

5.4 current_user is nil #69

@nrosella

Description

@nrosella

I've been following the tutorial fine so far but I'm getting stuck at 5.4

In my user_controllers_spec.rb tests I'm able to set the request headers to the user's auth token that's provided in the factory.

However, by the time I get into the users_controller.rb I find that

User.find_by(auth_token: request.headers['Authorization']) == nil

and hence I don't have a current_user in my update action.

You can find my latest code here should it help: https://github.com/nrosella/market_place_api

Any help would be great!

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions