mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-17 09:48:42 +00:00
Merge commit '7f84bbfd92377689f84121ec45c5b9d809d94cde' into glitch-soc/merge-upstream
This commit is contained in:
@@ -44,14 +44,13 @@ describe Admin::InvitesController do
|
||||
end
|
||||
|
||||
describe 'POST #deactivate_all' do
|
||||
before { Fabricate(:invite, expires_at: nil) }
|
||||
|
||||
it 'expires all invites, then redirects to admin_invites_path' do
|
||||
invites = Fabricate.times(1, :invite, expires_at: nil)
|
||||
|
||||
post :deactivate_all
|
||||
|
||||
invites.each do |invite|
|
||||
expect(invite.reload).to be_expired
|
||||
end
|
||||
expect { post :deactivate_all }
|
||||
.to change { Invite.exists?(expires_at: nil) }
|
||||
.from(true)
|
||||
.to(false)
|
||||
|
||||
expect(response).to redirect_to admin_invites_path
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user