diff options
Diffstat (limited to 'spec/requests/sessions_controller/delete_sessions_controller_spec.rb')
-rw-r--r-- | spec/requests/sessions_controller/delete_sessions_controller_spec.rb | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/spec/requests/sessions_controller/delete_sessions_controller_spec.rb b/spec/requests/sessions_controller/delete_sessions_controller_spec.rb deleted file mode 100644 index bc669fc..0000000 --- a/spec/requests/sessions_controller/delete_sessions_controller_spec.rb +++ /dev/null @@ -1,15 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -RSpec.describe 'DELETE /api/logout', type: :request do - let(:user) { create(:user_account) } - let(:token) { jwt(user) } - - it "returns status 204 and deletes the user's session key" do - delete('/api/logout', headers: { 'Authorization' => "Bearer #{token['token']}" }) - expect(response).to have_http_status(204) - user.reload - expect(user.session_key).to be_nil - end -end |