Move edit account action to show

This commit is contained in:
Anton Khorev 2025-02-17 02:35:09 +03:00
parent 9929c1b585
commit d1de8462d6
25 changed files with 75 additions and 71 deletions

View file

@ -29,7 +29,7 @@ module Accounts
session_for(user)
get account_terms_path
assert_redirected_to edit_account_path
assert_redirected_to account_path
end
def test_show_not_seen_without_referer
@ -53,7 +53,7 @@ module Accounts
session_for(user)
put account_terms_path, :params => { :read_ct => 1, :read_tou => 1 }
assert_redirected_to edit_account_path
assert_redirected_to account_path
assert_equal "Thanks for accepting the new contributor terms!", flash[:notice]
user.reload
@ -82,8 +82,8 @@ module Accounts
user = create(:user, :terms_seen => false, :terms_agreed => nil)
session_for(user)
get edit_account_path
assert_redirected_to account_terms_path(:referer => "/account/edit")
get account_path
assert_redirected_to account_terms_path(:referer => account_path)
end
end
end