Skip to content

Fix broken authorization caused by missing env#5

Open
WillTaylor22 wants to merge 1 commit intojameschambers:masterfrom
WillTaylor22:patch-1
Open

Fix broken authorization caused by missing env#5
WillTaylor22 wants to merge 1 commit intojameschambers:masterfrom
WillTaylor22:patch-1

Conversation

@WillTaylor22
Copy link

To reproduce:
rails 6.0.3.2 new test-api --api -m boring-bits-rails-api/template.rb

$ rails c

ENV["DEVISE_JWT_SECRET_KEY"]
=> nil

$ rspec

Failures:
...

  1. Api::UsersController When fetching a user returns 200
    Failure/Error: expect(response.status).to eq(200)
    ...
    12 examples, 3 failures

Failed examples:

rspec ./spec/controllers/users_controller_spec.rb:15 # Api::UsersController When fetching a user returns 200
rspec ./spec/controllers/users_controller_spec.rb:19 # Api::UsersController When fetching a user returns the user
rspec ./spec/controllers/users_controller_spec.rb:33 # Api::UsersController When a user is missing returns 404

To reproduce:
rails _6.0.3.2_ new test-api --api -m boring-bits-rails-api/template.rb

$ rails c
 > ENV["DEVISE_JWT_SECRET_KEY"]
 => nil 

$ rspec 

Failures:
...
  1) Api::UsersController When fetching a user returns 200
     Failure/Error: expect(response.status).to eq(200)
...
12 examples, 3 failures

Failed examples:

rspec ./spec/controllers/users_controller_spec.rb:15 # Api::UsersController When fetching a user returns 200
rspec ./spec/controllers/users_controller_spec.rb:19 # Api::UsersController When fetching a user returns the user
rspec ./spec/controllers/users_controller_spec.rb:33 # Api::UsersController When a user is missing returns 404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant