Skip to content

Commit

Permalink
不要になったテストを削除
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Oct 1, 2023
1 parent 9f0f247 commit 8da842d
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions spec/serializers/activitypub/note_serializer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
let!(:reply_by_account_visibility_direct) { Fabricate(:status, account: account, thread: parent, visibility: :direct) }
let!(:referred) { nil }
let!(:referred2) { nil }
let(:convert_to_quote) { false }

before(:each) do
parent.references << referred if referred.present?
parent.references << referred2 if referred2.present?
account.user&.settings&.[]=('single_ref_to_quote', true) if convert_to_quote
@serialization = ActiveModelSerializers::SerializableResource.new(parent, serializer: described_class, adapter: ActivityPub::Adapter)
end

Expand Down Expand Up @@ -64,28 +62,4 @@
expect(subject['references']['first']['items']).to include referred.uri
end
end

context 'when has quote and convert setting' do
let(:referred) { Fabricate(:status) }
let(:convert_to_quote) { true }

it 'has as quote' do
expect(subject['quoteUri']).to_not be_nil
expect(subject['quoteUri']).to eq referred.uri
expect(subject['_misskey_quote']).to eq referred.uri
expect(subject['references']['first']['items']).to include referred.uri
end
end

context 'when has multiple references and convert setting' do
let(:referred) { Fabricate(:status) }
let(:referred2) { Fabricate(:status) }
let(:convert_to_quote) { true }

it 'has as quote' do
expect(subject['quoteUri']).to be_nil
expect(subject['references']['first']['items']).to include referred.uri
expect(subject['references']['first']['items']).to include referred2.uri
end
end
end

0 comments on commit 8da842d

Please sign in to comment.