1
0
Fork 0
forked from gitea/nas

Merge remote-tracking branch 'parent/main' into upstream-20240112

This commit is contained in:
KMY 2024-01-12 14:48:17 +09:00
commit e65fb9fb51
333 changed files with 2661 additions and 1461 deletions

View file

@ -14,7 +14,7 @@ describe BackupWorker do
let(:backup) { Fabricate(:backup) }
let!(:other_backup) { Fabricate(:backup, user: backup.user) }
it 'sends the backup to the service and removes other backups' do
it 'sends the backup to the service and removes other backups', :sidekiq_inline do
expect do
worker.perform(backup.id)
end.to change(UserMailer.deliveries, :size).by(1)

View file

@ -73,19 +73,19 @@ describe FeedInsertWorker do
end
context 'with notification' do
it 'skips notification when unset' do
it 'skips notification when unset', :sidekiq_inline do
subject.perform(status.id, follower.id)
expect(notify?(follower, 'status', status.id)).to be false
end
it 'pushes notification when read status is set' do
it 'pushes notification when read status is set', :sidekiq_inline do
Fabricate(:follow, account: follower, target_account: status.account, notify: true)
subject.perform(status.id, follower.id)
expect(notify?(follower, 'status', status.id)).to be true
end
it 'skips notification when the account is registered list but not notify' do
it 'skips notification when the account is registered list but not notify', :sidekiq_inline do
follower.follow!(status.account)
list = Fabricate(:list, account: follower)
Fabricate(:list_account, list: list, account: status.account)
@ -97,7 +97,7 @@ describe FeedInsertWorker do
expect(list_status).to be_nil
end
it 'pushes notification when the account is registered list' do
it 'pushes notification when the account is registered list', :sidekiq_inline do
follower.follow!(status.account)
list = Fabricate(:list, account: follower, notify: true)
Fabricate(:list_account, list: list, account: status.account)

View file

@ -104,7 +104,7 @@ describe MoveWorker do
end
shared_examples 'lists handling' do
it 'puts the new account on the list and makes valid lists', sidekiq: :inline do
it 'puts the new account on the list and makes valid lists', :sidekiq_inline do
subject.perform(source_account.id, target_account.id)
expect(list.accounts.include?(target_account)).to be true
@ -159,7 +159,7 @@ describe MoveWorker do
describe '#perform' do
context 'when both accounts are distant' do
it 'calls UnfollowFollowWorker', :sidekiq_fake do
it 'calls UnfollowFollowWorker' do
subject.perform(source_account.id, target_account.id)
expect(UnfollowFollowWorker).to have_enqueued_sidekiq_job(local_follower.id, source_account.id, target_account.id, false)
end
@ -170,7 +170,7 @@ describe MoveWorker do
context 'when target account is local' do
let(:target_account) { Fabricate(:account) }
it 'calls UnfollowFollowWorker', :sidekiq_fake do
it 'calls UnfollowFollowWorker' do
subject.perform(source_account.id, target_account.id)
expect(UnfollowFollowWorker).to have_enqueued_sidekiq_job(local_follower.id, source_account.id, target_account.id, true)
end

View file

@ -10,7 +10,7 @@ describe PollExpirationNotifyWorker do
let(:remote?) { false }
let(:poll_vote) { Fabricate(:poll_vote, poll: poll) }
describe '#perform', :sidekiq_fake do
describe '#perform' do
it 'runs without error for missing record' do
expect { worker.perform(nil) }.to_not raise_error
end