1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-27 14:28:24 +09:00

Move status creation to "with rss" context in accounts request spec (#32020)

This commit is contained in:
Matt Jankowski 2024-09-23 05:20:43 -04:00 committed by GitHub
parent cd7b670cd8
commit 66ed7ea4b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,21 +46,6 @@ RSpec.describe 'Accounts show response' do
describe 'GET to short username paths' do describe 'GET to short username paths' do
context 'with existing statuses' do context 'with existing statuses' do
let!(:status) { Fabricate(:status, account: account) }
let!(:status_reply) { Fabricate(:status, account: account, thread: Fabricate(:status)) }
let!(:status_self_reply) { Fabricate(:status, account: account, thread: status) }
let!(:status_media) { Fabricate(:status, account: account) }
let!(:status_pinned) { Fabricate(:status, account: account) }
let!(:status_private) { Fabricate(:status, account: account, visibility: :private) }
let!(:status_direct) { Fabricate(:status, account: account, visibility: :direct) }
let!(:status_reblog) { Fabricate(:status, account: account, reblog: Fabricate(:status)) }
before do
status_media.media_attachments << Fabricate(:media_attachment, account: account, type: :image)
account.pinned_statuses << status_pinned
account.pinned_statuses << status_private
end
context 'with HTML' do context 'with HTML' do
let(:format) { 'html' } let(:format) { 'html' }
@ -207,6 +192,21 @@ RSpec.describe 'Accounts show response' do
context 'with RSS' do context 'with RSS' do
let(:format) { 'rss' } let(:format) { 'rss' }
let!(:status) { Fabricate(:status, account: account) }
let!(:status_reply) { Fabricate(:status, account: account, thread: Fabricate(:status)) }
let!(:status_self_reply) { Fabricate(:status, account: account, thread: status) }
let!(:status_media) { Fabricate(:status, account: account) }
let!(:status_pinned) { Fabricate(:status, account: account) }
let!(:status_private) { Fabricate(:status, account: account, visibility: :private) }
let!(:status_direct) { Fabricate(:status, account: account, visibility: :direct) }
let!(:status_reblog) { Fabricate(:status, account: account, reblog: Fabricate(:status)) }
before do
status_media.media_attachments << Fabricate(:media_attachment, account: account, type: :image)
account.pinned_statuses << status_pinned
account.pinned_statuses << status_private
end
context 'with a normal account in an RSS request' do context 'with a normal account in an RSS request' do
before do before do
get short_account_path(username: account.username, format: format) get short_account_path(username: account.username, format: format)