adding the user controller for futzing with login bits
This commit is contained in:
parent
6f9519fce9
commit
7ca80880a8
14
cookbook/015/hodgepodge/app/controllers/user_controller.rb
Normal file
14
cookbook/015/hodgepodge/app/controllers/user_controller.rb
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
class UserController < ApplicationController
|
||||||
|
def login
|
||||||
|
end
|
||||||
|
|
||||||
|
def process_login
|
||||||
|
end
|
||||||
|
|
||||||
|
def logout
|
||||||
|
end
|
||||||
|
|
||||||
|
def my_account
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
2
cookbook/015/hodgepodge/app/helpers/user_helper.rb
Normal file
2
cookbook/015/hodgepodge/app/helpers/user_helper.rb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
module UserHelper
|
||||||
|
end
|
2
cookbook/015/hodgepodge/app/views/user/login.html.erb
Normal file
2
cookbook/015/hodgepodge/app/views/user/login.html.erb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<h1>User#login</h1>
|
||||||
|
<p>Find me in app/views/user/login.html.erb</p>
|
2
cookbook/015/hodgepodge/app/views/user/logout.html.erb
Normal file
2
cookbook/015/hodgepodge/app/views/user/logout.html.erb
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<h1>User#logout</h1>
|
||||||
|
<p>Find me in app/views/user/logout.html.erb</p>
|
@ -0,0 +1,2 @@
|
|||||||
|
<h1>User#my_account</h1>
|
||||||
|
<p>Find me in app/views/user/my_account.html.erb</p>
|
@ -0,0 +1,2 @@
|
|||||||
|
<h1>User#process_login</h1>
|
||||||
|
<p>Find me in app/views/user/process_login.html.erb</p>
|
@ -1,4 +1,12 @@
|
|||||||
Hodgepodge::Application.routes.draw do
|
Hodgepodge::Application.routes.draw do
|
||||||
|
get "user/login"
|
||||||
|
|
||||||
|
get "user/process_login"
|
||||||
|
|
||||||
|
get "user/logout"
|
||||||
|
|
||||||
|
get "user/my_account"
|
||||||
|
|
||||||
get "people/list"
|
get "people/list"
|
||||||
|
|
||||||
get "foo/pretty"
|
get "foo/pretty"
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class UserControllerTest < ActionController::TestCase
|
||||||
|
test "should get login" do
|
||||||
|
get :login
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
test "should get process_login" do
|
||||||
|
get :process_login
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
test "should get logout" do
|
||||||
|
get :logout
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
test "should get my_account" do
|
||||||
|
get :my_account
|
||||||
|
assert_response :success
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
@ -0,0 +1,4 @@
|
|||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class UserHelperTest < ActionView::TestCase
|
||||||
|
end
|
Loading…
Reference in New Issue
Block a user