1
0
Fork 0
forked from gitea/nas

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

This commit is contained in:
KMY 2024-06-10 08:19:27 +09:00
commit 90f2ea9015
125 changed files with 2266 additions and 1504 deletions

View file

@ -10,10 +10,16 @@ RSpec.describe 'Account actions' do
let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
shared_examples 'a successful notification delivery' do
it 'notifies the user about the action taken' do
expect { subject }
.to have_enqueued_job(ActionMailer::MailDeliveryJob)
.with('UserMailer', 'warning', 'deliver_now!', args: [User, AccountWarning])
it 'notifies the user about the action taken', :sidekiq_inline do
emails = capture_emails { subject }
expect(emails.size)
.to eq(1)
expect(emails.first)
.to have_attributes(
to: contain_exactly(target_account.user.email)
)
end
end