Merge commit '2954279e9c630a9d146575bf600978dc6c5279bd' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2024-01-11 20:15:19 +01:00
22 changed files with 200 additions and 67 deletions

View File

@@ -43,10 +43,20 @@ describe Settings::FeaturedTagsController do
end
describe 'GET to #index' do
let(:tag) { Fabricate(:tag) }
before do
status = Fabricate :status, account: user.account
status.tags << tag
end
it 'responds with success' do
get :index
expect(response).to have_http_status(200)
expect(response.body).to include(
settings_featured_tags_path(featured_tag: { name: tag.name })
)
end
end

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