Merge remote-tracking branch 'upstream/stable-4.7', removing Mastodon-Modern folder.

This commit is contained in:
Tarrien committed 2026-11-06 04:33:35 -05:00
commit 8eabb7ea31
959 files changed
+29430 -9565

No files matched your search

@@ -66,5 +66,30 @@ RSpec.describe 'API V1 Accounts FollowerAccounts' do
)
end
end
context 'when request account is permanently deleted' do
before do
account.mark_deleted!
account.deletion_request.destroy
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/followers", params: { limit: 2 }, headers: headers
expect(response).to have_http_status(404)
end
end
context 'when request account is pending deletion' do
before do
account.mark_deleted!
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/followers", params: { limit: 2 }, headers: headers
expect(response).to have_http_status(404)
end
end
end
end
@@ -66,5 +66,30 @@ RSpec.describe 'API V1 Accounts FollowingAccounts' do
)
end
end
context 'when request account is permanently deleted' do
before do
account.mark_deleted!
account.deletion_request.destroy
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/following", params: { limit: 2 }, headers: headers
expect(response).to have_http_status(404)
end
end
context 'when request account is pending deletion' do
before do
account.mark_deleted!
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/following", params: { limit: 2 }, headers: headers
expect(response).to have_http_status(404)
end
end
end
end
@@ -22,4 +22,29 @@ RSpec.describe 'Accounts Lists API' do
.to start_with('application/json')
end
end
context 'when requested account is permanently deleted' do
before do
account.mark_deleted!
account.deletion_request.destroy
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/lists", headers: headers
expect(response).to have_http_status(404)
end
end
context 'when requested account is pending deletion' do
before do
account.mark_deleted!
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/lists", headers: headers
expect(response).to have_http_status(404)
end
end
end
@@ -152,5 +152,34 @@ RSpec.describe 'API V1 Accounts Statuses' do
end
end
end
context 'when requested account is permanently deleted' do
let(:account) { Fabricate(:account) }
before do
account.mark_deleted!
account.deletion_request.destroy
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/statuses", params: { limit: 2 }, headers: headers
expect(response).to have_http_status(404)
end
end
context 'when requested account is pending deletion' do
let(:account) { Fabricate(:account) }
before do
account.mark_deleted!
end
it 'returns http not found' do
get "/api/v1/accounts/#{account.id}/statuses", params: { limit: 2 }, headers: headers
expect(response).to have_http_status(404)
end
end
end
end
+25
View File
@@ -48,6 +48,31 @@ RSpec.describe '/api/v1/accounts' do
end
end
context 'when requesting a permanently deleted account' do
let(:other_account) { Fabricate(:account, requested_deletion: true) }
before do
get "/api/v1/accounts/#{other_account.id}"
end
it 'returns http not found' do
expect(response).to have_http_status(404)
end
end
context 'when requesting an account pending deletion' do
let(:other_account) { Fabricate(:account) }
before do
other_account.mark_deleted!
get "/api/v1/accounts/#{other_account.id}"
end
it 'returns http not found' do
expect(response).to have_http_status(404)
end
end
context 'when logged in' do
subject do
get "/api/v1/accounts/#{account.id}", headers: headers
@@ -12,6 +12,7 @@ RSpec.describe 'Featured Tags Suggestions API' do
describe 'GET /api/v1/featured_tags/suggestions' do
let!(:unused_featured_tag) { Fabricate(:tag, name: 'unused_featured_tag') }
let!(:used_tag) { Fabricate(:tag, name: 'used_tag') }
let!(:used_tag_once) { Fabricate(:tag, name: 'used_tag_once') }
let!(:used_featured_tag) { Fabricate(:tag, name: 'used_featured_tag') }
before do
@@ -20,8 +21,13 @@ RSpec.describe 'Featured Tags Suggestions API' do
# Make relevant tags used by account
status = Fabricate(:status, account: account)
status.tags << used_tag
status.tags << used_tag_once
status.tags << used_featured_tag
status2 = Fabricate(:status, account: account)
status2.tags << used_tag
status2.tags << used_featured_tag
# Feature the relevant tags
Fabricate :featured_tag, account: account, name: unused_featured_tag.name
Fabricate :featured_tag, account: account, name: used_featured_tag.name