1
0
Fork 0
forked from gitea/nas

Remove: kmyblue独自機能の引用

This commit is contained in:
KMY 2025-04-24 08:48:28 +09:00
parent 620a895184
commit d845d1e9fb
70 changed files with 812 additions and 1788 deletions

View file

@ -86,39 +86,6 @@ RSpec.describe Status do
end
end
describe '#quote' do
let(:target_status) { Fabricate(:status) }
let(:quote) { true }
before do
Fabricate(:status_reference, status: subject, target_status: target_status, quote: quote)
end
context 'when quoting single' do
it 'get quote' do
expect(subject.quote).to_not be_nil
expect(subject.quote.id).to eq target_status.id
end
end
context 'when multiple quotes' do
it 'get quote' do
target2 = Fabricate(:status)
Fabricate(:status_reference, status: subject, quote: quote)
expect(subject.quote).to_not be_nil
expect([target_status.id, target2.id].include?(subject.quote.id)).to be true
end
end
context 'when no quote but reference' do
let(:quote) { false }
it 'get quote' do
expect(subject.quote).to be_nil
end
end
end
describe '#content' do
it 'returns the text of the status if it is not a reblog' do
expect(subject.content).to eql subject.text