0
0
Fork 0

Refactor login activity partial (remove inline ruby) (#28687)

This commit is contained in:
Matt Jankowski 2024-01-11 05:36:27 -05:00 committed by GitHub
parent 204bbf49d2
commit 55802242ce
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 62 additions and 9 deletions

View file

@ -6,6 +6,7 @@ describe Settings::LoginActivitiesController do
render_views
let!(:user) { Fabricate(:user) }
let!(:login_activity) { Fabricate :login_activity, user: user }
before do
sign_in user, scope: :user
@ -19,6 +20,10 @@ describe Settings::LoginActivitiesController do
it 'returns http success with private cache control headers', :aggregate_failures do
expect(response).to have_http_status(200)
expect(response.headers['Cache-Control']).to include('private, no-store')
expect(response.body)
.to include(login_activity.user_agent)
.and include(login_activity.authentication_method)
.and include(login_activity.ip.to_s)
end
end
end