Merge remote-tracking branch 'parent/main' into kbtopic-remove-quote

This commit is contained in:
KMY 2025-04-26 08:30:17 +09:00
commit 80542ea172
76 changed files with 658 additions and 390 deletions

View file

@ -3,8 +3,8 @@
require 'rails_helper'
RSpec.describe Account do
include_examples 'Account::Search'
include_examples 'Reviewable'
it_behaves_like 'Account::Search'
it_behaves_like 'Reviewable'
context 'with an account record' do
subject { Fabricate(:account) }
@ -992,8 +992,8 @@ RSpec.describe Account do
end
end
include_examples 'AccountAvatar', :account
include_examples 'AccountHeader', :account
it_behaves_like 'AccountAvatar', :account
it_behaves_like 'AccountHeader', :account
describe '#increment_count!' do
subject { Fabricate(:account) }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe CustomFilter do
include_examples 'Expireable'
it_behaves_like 'Expireable'
describe 'Validations' do
it { is_expected.to validate_presence_of(:title) }

View file

@ -17,7 +17,7 @@ RSpec.describe FeaturedTag do
let(:account) { Fabricate :account }
it { is_expected.to_not allow_value('Test').for(:name) }
it { is_expected.to_not allow_value('Test').for(:name).against(:tag_id) }
context 'when account has hit limit' do
before { stub_const 'FeaturedTag::LIMIT', 1 }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe Invite do
include_examples 'Expireable'
it_behaves_like 'Expireable'
describe 'Associations' do
it { is_expected.to belong_to(:user).inverse_of(:invites) }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe IpBlock do
include_examples 'Expireable'
it_behaves_like 'Expireable'
describe 'Validations' do
subject { Fabricate.build :ip_block }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe LoginActivity do
include_examples 'BrowserDetection'
it_behaves_like 'BrowserDetection'
describe 'Associations' do
it { is_expected.to belong_to(:user).required }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe Mute do
include_examples 'Expireable'
it_behaves_like 'Expireable'
describe 'Associations' do
it { is_expected.to belong_to(:account).required }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe Poll do
include_examples 'Expireable'
it_behaves_like 'Expireable'
describe '#reset_votes!' do
let(:poll) { Fabricate :poll, cached_tallies: [2, 3], votes_count: 5, voters_count: 5 }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe PreviewCardProvider do
include_examples 'Reviewable'
it_behaves_like 'Reviewable'
describe 'scopes' do
let(:trendable_and_reviewed) { Fabricate(:preview_card_provider, trendable: true, reviewed_at: 5.days.ago) }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe PreviewCardTrend do
include_examples 'RankedTrend'
it_behaves_like 'RankedTrend'
describe 'Associations' do
it { is_expected.to belong_to(:preview_card).required }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe SessionActivation do
include_examples 'BrowserDetection'
it_behaves_like 'BrowserDetection'
describe '.active?' do
subject { described_class.active?(id) }

View file

@ -9,7 +9,7 @@ RSpec.describe Status do
let(:bob) { Fabricate(:account, username: 'bob') }
let(:other) { Fabricate(:status, account: bob, text: 'Skulls for the skull god! The enemy\'s gates are sideways!') }
include_examples 'Status::Visibility'
it_behaves_like 'Status::Visibility'
describe '#local?' do
it 'returns true when no remote URI is set' do

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe StatusTrend do
include_examples 'RankedTrend'
it_behaves_like 'RankedTrend'
describe 'Associations' do
it { is_expected.to belong_to(:account).required }

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe Tag do
include_examples 'Reviewable'
it_behaves_like 'Reviewable'
describe 'Validations' do
describe 'name' do

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe TagTrend do
include_examples 'RankedTrend'
it_behaves_like 'RankedTrend'
describe 'Associations' do
it { is_expected.to belong_to(:tag).required }