Skip to content

Commit

Permalink
Added confirm_password feature to views generator (#237)
Browse files Browse the repository at this point in the history
  • Loading branch information
igor-alexandrov authored Oct 20, 2023
1 parent 34a2048 commit 525be3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/generators/rodauth/views_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class ViewsGenerator < ::Rails::Generators::Base
recovery_codes: %w[recovery_codes add_recovery_codes recovery_auth],
webauthn: %w[webauthn_setup webauthn_auth webauthn_remove],
webauthn_autofill: %w[webauthn_autofill],
confirm_password: %w[confirm_password],
}

def create_views
Expand Down
3 changes: 2 additions & 1 deletion test/generators/views_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ class ViewsGeneratorTest < Rails::Generators::TestCase
end

test "choosing features" do
run_generator %w[lockout]
run_generator %w[lockout confirm_password]

assert_file "app/views/rodauth/unlock_account_request.html.erb"
assert_file "app/views/rodauth/unlock_account.html.erb"
assert_file "app/views/rodauth/confirm_password.html.erb"

assert_no_file "app/views/rodauth/login.html.erb"
assert_no_file "app/views/rodauth/create_account.html.erb"
Expand Down

0 comments on commit 525be3d

Please sign in to comment.