mirror of
https://github.com/yingziwu/mastodon.git
synced 2026-02-04 03:25:14 +00:00
Change redirection for denied registration from web app to sign-in page with error message (#36384)
This commit is contained in:
parent
c6de46d12d
commit
fab0dd0bcf
3 changed files with 6 additions and 5 deletions
|
|
@ -12,11 +12,11 @@ RSpec.describe Auth::RegistrationsController do
|
|||
allow(Rails.configuration.x).to receive(:single_user_mode).and_return(true)
|
||||
end
|
||||
|
||||
it 'redirects to root' do
|
||||
it 'redirects to sign-in' do
|
||||
Fabricate(:account)
|
||||
get path
|
||||
|
||||
expect(response).to redirect_to '/'
|
||||
expect(response).to redirect_to '/auth/sign_in'
|
||||
expect(Rails.configuration.x).to have_received(:single_user_mode)
|
||||
end
|
||||
end
|
||||
|
|
@ -27,10 +27,10 @@ RSpec.describe Auth::RegistrationsController do
|
|||
allow(Rails.configuration.x).to receive(:single_user_mode).and_return(false)
|
||||
end
|
||||
|
||||
it 'redirects to root' do
|
||||
it 'redirects to sign-in' do
|
||||
get path
|
||||
|
||||
expect(response).to redirect_to '/'
|
||||
expect(response).to redirect_to '/auth/sign_in'
|
||||
expect(Rails.configuration.x).to have_received(:single_user_mode)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue