login_activities_controller_spec.rb 510 B

123456789101112131415161718192021222324252627
  1. # frozen_string_literal: true
  2. require 'rails_helper'
  3. describe Settings::LoginActivitiesController do
  4. render_views
  5. let!(:user) { Fabricate(:user) }
  6. before do
  7. sign_in user, scope: :user
  8. end
  9. describe 'GET #index' do
  10. before do
  11. get :index
  12. end
  13. it 'returns http success' do
  14. expect(response).to have_http_status(200)
  15. end
  16. it 'returns private cache control headers' do
  17. expect(response.headers['Cache-Control']).to include('private, no-store')
  18. end
  19. end
  20. end