Permalink
Browse files

add login controller

  • Loading branch information...
FuriKuri committed Nov 6, 2012
1 parent ef91f9b commit 7cb0987c9a30c6211e72622945a818f49f33faae
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
@@ -0,0 +1,3 @@
+// Place all the styles related to the home controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,13 @@
+class HomeController < ApplicationController
+ def index
+ end
+
+ def login
+ end
+
+ def register
+ end
+
+ def logout
+ end
+end
@@ -0,0 +1,2 @@
+module HomeHelper
+end
@@ -0,0 +1,2 @@
+<h1>Home#index</h1>
+<p>Find me in app/views/home/index.html.erb</p>
@@ -0,0 +1,2 @@
+<h1>Home#login</h1>
+<p>Find me in app/views/home/login.html.erb</p>
@@ -0,0 +1,2 @@
+<h1>Home#logout</h1>
+<p>Find me in app/views/home/logout.html.erb</p>
@@ -0,0 +1,2 @@
+<h1>Home#register</h1>
+<p>Find me in app/views/home/register.html.erb</p>
View
@@ -1,4 +1,12 @@
ShareYourBooks::Application.routes.draw do
+ get "home/index"
+
+ get "home/login"
+
+ get "home/register"
+
+ get "home/logout"
+
resources :books
resources :users
@@ -0,0 +1,24 @@
+require 'test_helper'
+
+class HomeControllerTest < ActionController::TestCase
+ test "should get index" do
+ get :index
+ assert_response :success
+ end
+
+ test "should get login" do
+ get :login
+ assert_response :success
+ end
+
+ test "should get register" do
+ get :register
+ assert_response :success
+ end
+
+ test "should get logout" do
+ get :logout
+ assert_response :success
+ end
+
+end
@@ -0,0 +1,4 @@
+require 'test_helper'
+
+class HomeHelperTest < ActionView::TestCase
+end

0 comments on commit 7cb0987

Please sign in to comment.