This commit is contained in:
KMY 2023-10-18 10:41:42 +09:00 committed by KMY(雪あすか)
parent 1d9c77063e
commit 84eae6fac9
32 changed files with 556 additions and 586 deletions

View file

@ -22,7 +22,7 @@ describe 'Admin::Accounts' do
context 'without selecting any accounts' do
it 'displays a notice about account selection' do
click_on button_for_suspend
click_button button_for_suspend
expect(page).to have_content(selection_error_text)
end
@ -32,7 +32,7 @@ describe 'Admin::Accounts' do
it 'suspends the account' do
batch_checkbox_for(approved_user_account).check
click_on button_for_suspend
click_button button_for_suspend
expect(approved_user_account.reload).to be_suspended
end
@ -42,7 +42,7 @@ describe 'Admin::Accounts' do
it 'approves the account user' do
batch_checkbox_for(unapproved_user_account).check
click_on button_for_approve
click_button button_for_approve
expect(unapproved_user_account.reload.user).to be_approved
end
@ -52,7 +52,7 @@ describe 'Admin::Accounts' do
it 'rejects and removes the account' do
batch_checkbox_for(unapproved_user_account).check
click_on button_for_reject
click_button button_for_reject
expect { unapproved_user_account.reload }.to raise_error(ActiveRecord::RecordNotFound)
end