Skip to content

Commit

Permalink
Merge branch '7986-user-account-closure-redirects' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
garethrees committed Feb 7, 2024
2 parents 8352fa8 + 108a7fb commit 0666a59
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def create
flash[:error] = 'Something went wrong. The user could not be anonymised.'
end

redirect_to admin_user_path(@anonymised_user)
redirect_to edit_admin_user_path(@anonymised_user)
end

private
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/admin_users_account_closing_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def create
'Something went wrong. The user account could not be closed.'
end

redirect_to admin_user_path(@closed_user)
redirect_to edit_admin_user_path(@closed_user)
end

private
Expand Down
1 change: 1 addition & 0 deletions doc/CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Highlighted Features

* Improve redirection flow after user account closure actions (Gareth Rees)
* Fix duplicated attachment masking jobs (Graeme Porteous)
* Display metadata on admin attachment views (Graeme Porteous)
* Change request URL patterns to be member routes (Alexander Griffen, Graeme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
expect(assigns[:anonymised_user]).to eq(user)
end

it 'redirects to the user page' do
expect(response).to redirect_to(admin_user_path(user))
it 'redirects to the user edit page' do
expect(response).to redirect_to(edit_admin_user_path(user))
end

context 'on an open account' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
expect(flash[:notice]).to eq('The user account was closed.')
end

it 'redirects to the user page' do
expect(response).to redirect_to(admin_user_path(user))
it 'redirects to the user edit page' do
expect(response).to redirect_to(edit_admin_user_path(user))
end
end

Expand Down

0 comments on commit 0666a59

Please sign in to comment.