Merge commit '0caf334891e0a5f4e995f1d667eb83d3aad7e41e' into glitch-soc/merge-upstream

Conflicts:
- `lib/mastodon/version.rb`:
  Upstream updated the API version, while we also have a custom glitch API version.
  Updated as upstream did.
This commit is contained in:
Claire committed 2026-05-30 12:13:35 +02:00
commit ae2ff31f32
114 files changed
+1147 -740

No files matched your search

@@ -2,7 +2,7 @@
require 'rails_helper'
RSpec.describe 'Api::V1Alpha::CollectionItems', feature: :collections do
RSpec.describe 'Api::V1Alpha::CollectionItems' do
include_context 'with API authentication', oauth_scopes: 'read:collections write:collections'
describe 'POST /api/v1_alpha/collections/:collection_id/items' do
@@ -2,12 +2,12 @@
require 'rails_helper'
RSpec.describe 'Api::V1Alpha::Collections', feature: :collections do
RSpec.describe 'Api::V1::Collections' do
include_context 'with API authentication', oauth_scopes: 'read:collections write:collections'
describe 'GET /api/v1_alpha/accounts/:account_id/collections' do
describe 'GET /api/v1/accounts/:account_id/collections' do
subject do
get "/api/v1_alpha/accounts/#{account.id}/collections", headers: headers, params: params
get "/api/v1/accounts/#{account.id}/collections", headers: headers, params: params
end
let(:params) { {} }
@@ -34,7 +34,7 @@ RSpec.describe 'Api::V1Alpha::Collections', feature: :collections do
expect(response)
.to include_pagination_headers(
next: api_v1_alpha_account_collections_url(account, limit: 1, offset: 1)
next: api_v1_account_collections_url(account, limit: 1, offset: 1)
)
end
end
@@ -50,8 +50,8 @@ RSpec.describe 'Api::V1Alpha::Collections', feature: :collections do
expect(response)
.to include_pagination_headers(
prev: api_v1_alpha_account_collections_url(account, limit: 1, offset: 0),
next: api_v1_alpha_account_collections_url(account, limit: 1, offset: 2)
prev: api_v1_account_collections_url(account, limit: 1, offset: 0),
next: api_v1_account_collections_url(account, limit: 1, offset: 2)
)
end
end
@@ -96,9 +96,9 @@ RSpec.describe 'Api::V1Alpha::Collections', feature: :collections do
end
end
describe 'GET /api/v1_alpha/collections/:id' do
describe 'GET /api/v1/collections/:id' do
subject do
get "/api/v1_alpha/collections/#{collection.id}", headers: headers
get "/api/v1/collections/#{collection.id}", headers: headers
end
let(:collection) { Fabricate(:collection) }
@@ -140,9 +140,9 @@ RSpec.describe 'Api::V1Alpha::Collections', feature: :collections do
end
end
describe 'POST /api/v1_alpha/collections' do
describe 'POST /api/v1/collections' do
subject do
post '/api/v1_alpha/collections', headers: headers, params: params
post '/api/v1/collections', headers: headers, params: params
end
let(:params) { {} }
@@ -187,9 +187,9 @@ RSpec.describe 'Api::V1Alpha::Collections', feature: :collections do
end
end
describe 'PATCH /api/v1_alpha/collections/:id' do
describe 'PATCH /api/v1/collections/:id' do
subject do
patch "/api/v1_alpha/collections/#{collection.id}", headers: headers, params: params
patch "/api/v1/collections/#{collection.id}", headers: headers, params: params
end
let(:collection) { Fabricate(:collection) }
@@ -256,9 +256,9 @@ RSpec.describe 'Api::V1Alpha::Collections', feature: :collections do
end
end
describe 'DELETE /api/v1_alpha/collections/:id' do
describe 'DELETE /api/v1/collections/:id' do
subject do
delete "/api/v1_alpha/collections/#{collection.id}", headers: headers
delete "/api/v1/collections/#{collection.id}", headers: headers
end
let(:collection) { Fabricate(:collection) }
@@ -2,12 +2,12 @@
require 'rails_helper'
RSpec.describe 'Api::V1Alpha::InCollections', feature: :collections do
RSpec.describe 'Api::V1::InCollections' do
include_context 'with API authentication', oauth_scopes: 'read:collections write:collections'
describe 'GET /api/v1_alpha/in_collections' do
describe 'GET /api/v1/in_collections' do
subject do
get "/api/v1_alpha/accounts/#{account.id}/in_collections", headers: headers, params: params
get "/api/v1/accounts/#{account.id}/in_collections", headers: headers, params: params
end
let(:params) { {} }
@@ -33,7 +33,7 @@ RSpec.describe 'Api::V1Alpha::InCollections', feature: :collections do
expect(response)
.to include_pagination_headers(
next: api_v1_alpha_account_in_collections_url(account, limit: 1, offset: 1)
next: api_v1_account_in_collections_url(account, limit: 1, offset: 1)
)
end
end
@@ -49,8 +49,8 @@ RSpec.describe 'Api::V1Alpha::InCollections', feature: :collections do
expect(response)
.to include_pagination_headers(
prev: api_v1_alpha_account_in_collections_url(account, limit: 1, offset: 0),
next: api_v1_alpha_account_in_collections_url(account, limit: 1, offset: 2)
prev: api_v1_account_in_collections_url(account, limit: 1, offset: 0),
next: api_v1_account_in_collections_url(account, limit: 1, offset: 2)
)
end
end
+1 -1
View File
@@ -113,7 +113,7 @@ RSpec.describe 'Reports' do
end
end
context 'with attached collection', feature: :collections do
context 'with attached collection' do
let(:collection) { Fabricate(:collection, account: target_account) }
let(:collection_ids) { [collection.id] }