diff --git a/cookbook/015/hodgepodge/app/controllers/user_controller.rb b/cookbook/015/hodgepodge/app/controllers/user_controller.rb new file mode 100644 index 0000000..af17834 --- /dev/null +++ b/cookbook/015/hodgepodge/app/controllers/user_controller.rb @@ -0,0 +1,14 @@ +class UserController < ApplicationController + def login + end + + def process_login + end + + def logout + end + + def my_account + end + +end diff --git a/cookbook/015/hodgepodge/app/helpers/user_helper.rb b/cookbook/015/hodgepodge/app/helpers/user_helper.rb new file mode 100644 index 0000000..0147c3f --- /dev/null +++ b/cookbook/015/hodgepodge/app/helpers/user_helper.rb @@ -0,0 +1,2 @@ +module UserHelper +end diff --git a/cookbook/015/hodgepodge/app/views/user/login.html.erb b/cookbook/015/hodgepodge/app/views/user/login.html.erb new file mode 100644 index 0000000..125c92a --- /dev/null +++ b/cookbook/015/hodgepodge/app/views/user/login.html.erb @@ -0,0 +1,2 @@ +
Find me in app/views/user/login.html.erb
diff --git a/cookbook/015/hodgepodge/app/views/user/logout.html.erb b/cookbook/015/hodgepodge/app/views/user/logout.html.erb new file mode 100644 index 0000000..50d0aac --- /dev/null +++ b/cookbook/015/hodgepodge/app/views/user/logout.html.erb @@ -0,0 +1,2 @@ +Find me in app/views/user/logout.html.erb
diff --git a/cookbook/015/hodgepodge/app/views/user/my_account.html.erb b/cookbook/015/hodgepodge/app/views/user/my_account.html.erb new file mode 100644 index 0000000..1bd6ef4 --- /dev/null +++ b/cookbook/015/hodgepodge/app/views/user/my_account.html.erb @@ -0,0 +1,2 @@ +Find me in app/views/user/my_account.html.erb
diff --git a/cookbook/015/hodgepodge/app/views/user/process_login.html.erb b/cookbook/015/hodgepodge/app/views/user/process_login.html.erb new file mode 100644 index 0000000..2042592 --- /dev/null +++ b/cookbook/015/hodgepodge/app/views/user/process_login.html.erb @@ -0,0 +1,2 @@ +Find me in app/views/user/process_login.html.erb
diff --git a/cookbook/015/hodgepodge/config/routes.rb b/cookbook/015/hodgepodge/config/routes.rb index e16dc87..82591b4 100644 --- a/cookbook/015/hodgepodge/config/routes.rb +++ b/cookbook/015/hodgepodge/config/routes.rb @@ -1,4 +1,12 @@ Hodgepodge::Application.routes.draw do + get "user/login" + + get "user/process_login" + + get "user/logout" + + get "user/my_account" + get "people/list" get "foo/pretty" diff --git a/cookbook/015/hodgepodge/test/functional/user_controller_test.rb b/cookbook/015/hodgepodge/test/functional/user_controller_test.rb new file mode 100644 index 0000000..b5da1f3 --- /dev/null +++ b/cookbook/015/hodgepodge/test/functional/user_controller_test.rb @@ -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 diff --git a/cookbook/015/hodgepodge/test/unit/helpers/user_helper_test.rb b/cookbook/015/hodgepodge/test/unit/helpers/user_helper_test.rb new file mode 100644 index 0000000..ad44a53 --- /dev/null +++ b/cookbook/015/hodgepodge/test/unit/helpers/user_helper_test.rb @@ -0,0 +1,4 @@ +require 'test_helper' + +class UserHelperTest < ActionView::TestCase +end