mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-19 12:48:42 +00:00
Merge commit '2954279e9c630a9d146575bf600978dc6c5279bd' into glitch-soc/merge-upstream
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user