Pauloparakleto / gerenciamento-dos-estudos

Aqui eu gerencio via karban os meus estudos em programação
0 stars 1 forks source link

How to build tests requests to api devise token authentication #64

Closed Pauloparakleto closed 3 years ago

Pauloparakleto commented 3 years ago

Devise api way

Pauloparakleto commented 3 years ago

With devise_token_auth you just need to use let!(:user){create(:user)} let!(:user_headers){user.create_new_auth_token} And pass the header together with params like: get your_path, params: { some: params }, headers: user_headers