FogBugz #44: created contacts controller.

This commit is contained in:
gchq 2011-05-04 00:00:53 +02:00
parent 0de0ec795c
commit 8992818890
12 changed files with 85 additions and 0 deletions

View file

@ -0,0 +1,23 @@
class ContactsController < ApplicationController
def index
end
def new
end
def create
end
def show
end
def edit
end
def update
end
def destroy
end
end

View file

@ -0,0 +1,2 @@
module ContactsHelper
end

View file

@ -0,0 +1,2 @@
<h1>Contacts#create</h1>
<p>Find me in app/views/contacts/create.html.erb</p>

View file

@ -0,0 +1,2 @@
<h1>Contacts#destroy</h1>
<p>Find me in app/views/contacts/destroy.html.erb</p>

View file

@ -0,0 +1,2 @@
<h1>Contacts#edit</h1>
<p>Find me in app/views/contacts/edit.html.erb</p>

View file

@ -0,0 +1,2 @@
<h1>Contacts#index</h1>
<p>Find me in app/views/contacts/index.html.erb</p>

View file

@ -0,0 +1,2 @@
<h1>Contacts#new</h1>
<p>Find me in app/views/contacts/new.html.erb</p>

View file

@ -0,0 +1,2 @@
<h1>Contacts#show</h1>
<p>Find me in app/views/contacts/show.html.erb</p>

View file

@ -0,0 +1,2 @@
<h1>Contacts#update</h1>
<p>Find me in app/views/contacts/update.html.erb</p>

View file

@ -1,4 +1,7 @@
ContactORama::Application.routes.draw do
resources :contacts
# The priority is based upon order of creation:
# first created -> highest priority.

View file

@ -0,0 +1,39 @@
require 'test_helper'
class ContactsControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
end
test "should get new" do
get :new
assert_response :success
end
test "should get create" do
get :create
assert_response :success
end
test "should get show" do
get :show
assert_response :success
end
test "should get edit" do
get :edit
assert_response :success
end
test "should get update" do
get :update
assert_response :success
end
test "should get destroy" do
get :destroy
assert_response :success
end
end

View file

@ -0,0 +1,4 @@
require 'test_helper'
class ContactsHelperTest < ActionView::TestCase
end