Merge branch 'master' into glitch-soc/merge-upstream
Conflicts: - README.md - app/javascript/styles/mastodon/components.scss conflicts caused by image URLs being different - app/models/status.rb as_home_timeline removed, kept glitch-soc-only as_direct_timeline - app/views/statuses/_simple_status.html.haml - config/locales/en.yml some strings were changed upstream - spec/models/status_spec.rb as_home_timeline removed, kept glitch-soc-only as_direct_timeline
This commit is contained in:
@ -333,49 +333,6 @@ RSpec.describe Status, type: :model do
|
||||
end
|
||||
end
|
||||
|
||||
describe '.as_home_timeline' do
|
||||
let(:account) { Fabricate(:account) }
|
||||
let(:followed) { Fabricate(:account) }
|
||||
let(:not_followed) { Fabricate(:account) }
|
||||
|
||||
before do
|
||||
Fabricate(:follow, account: account, target_account: followed)
|
||||
|
||||
@self_status = Fabricate(:status, account: account, visibility: :public)
|
||||
@self_direct_status = Fabricate(:status, account: account, visibility: :direct)
|
||||
@followed_status = Fabricate(:status, account: followed, visibility: :public)
|
||||
@followed_direct_status = Fabricate(:status, account: followed, visibility: :direct)
|
||||
@not_followed_status = Fabricate(:status, account: not_followed, visibility: :public)
|
||||
|
||||
@results = Status.as_home_timeline(account)
|
||||
end
|
||||
|
||||
it 'includes statuses from self' do
|
||||
expect(@results).to include(@self_status)
|
||||
end
|
||||
|
||||
it 'does not include direct statuses from self' do
|
||||
expect(@results).to_not include(@self_direct_status)
|
||||
end
|
||||
|
||||
it 'includes statuses from followed' do
|
||||
expect(@results).to include(@followed_status)
|
||||
end
|
||||
|
||||
it 'does not include direct statuses mentioning recipient from followed' do
|
||||
Fabricate(:mention, account: account, status: @followed_direct_status)
|
||||
expect(@results).to_not include(@followed_direct_status)
|
||||
end
|
||||
|
||||
it 'does not include direct statuses not mentioning recipient from followed' do
|
||||
expect(@results).not_to include(@followed_direct_status)
|
||||
end
|
||||
|
||||
it 'does not include statuses from non-followed' do
|
||||
expect(@results).not_to include(@not_followed_status)
|
||||
end
|
||||
end
|
||||
|
||||
describe '.as_direct_timeline' do
|
||||
let(:account) { Fabricate(:account) }
|
||||
let(:followed) { Fabricate(:account) }
|
||||
|
Reference in New Issue
Block a user