Sha256: 8489cda2905cfa64e72bc0a30899680a1df391c24006024e885e8f700642d39b
Contents?: true
Size: 952 Bytes
Versions: 1
Compression:
Stored size: 952 Bytes
Contents
require "test_helper" class RegistrationsControllerTest < ActionDispatch::IntegrationTest test "should get new" do get sign_up_url assert_response :success end test "should sign up" do assert_difference("<%= class_name %>.count") do post sign_up_url, params: { <%= singular_table_name %>: { email: "lazaronixon@hey.com", password: "Secret1*3*5*", password_confirmation: "Secret1*3*5*" } }, headers: { "User-Agent" => "Firefox" } end assert_redirected_to root_url end test "should destroy account" do sign_in_as <%= table_name %>(:lazaro_nixon) assert_difference("<%= class_name %>.count", -1) do delete registration_url end assert_redirected_to sign_in_url end def sign_in_as(<%= singular_table_name %>) post(sign_in_url, params: { email: <%= singular_table_name %>.email, password: "Secret1*3*5*" }, headers: { "User-Agent" => "Firefox" }); <%= singular_table_name %> end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
authentication-zero-2.8.0 | lib/generators/authentication/templates/test_unit/controllers/html/registrations_controller_test.rb.tt |