Sha256: 5f6b654c40d8a55c44f572b14465d682e41c4a222f2b7b18a059a6f2ca37eb46
Contents?: true
Size: 734 Bytes
Versions: 2
Compression:
Stored size: 734 Bytes
Contents
require "test_helper" class Sessions::SudosControllerTest < ActionDispatch::IntegrationTest setup do @<%= singular_table_name %> = sign_in_as(<%= table_name %>(:lazaro_nixon)) end test "should get new" do get new_sessions_sudo_url(proceed_to_url: edit_password_url) assert_response :success end test "should sudo" do post sessions_sudo_url, params: { password: "Secret1*3*5*", proceed_to_url: edit_password_url } assert_redirected_to edit_password_url end test "should not sudo with wrong password" do post sessions_sudo_url, params: { password: "SecretWrong1*3", proceed_to_url: edit_password_url } assert_redirected_to new_sessions_sudo_url(proceed_to_url: edit_password_url) end end
Version data entries
2 entries across 2 versions & 1 rubygems