login_activities_controller_spec.rb 507 B

123456789101112131415161718192021222324
  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 with private cache control headers', :aggregate_failures do
  14. expect(response).to have_http_status(200)
  15. expect(response.headers['Cache-Control']).to include('private, no-store')
  16. end
  17. end
  18. end