FogBugz #44: created contacts controller.
This commit is contained in:
parent
0de0ec795c
commit
8992818890
12 changed files with 85 additions and 0 deletions
23
app/controllers/contacts_controller.rb
Normal file
23
app/controllers/contacts_controller.rb
Normal 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
|
||||
2
app/helpers/contacts_helper.rb
Normal file
2
app/helpers/contacts_helper.rb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
module ContactsHelper
|
||||
end
|
||||
2
app/views/contacts/create.html.erb
Normal file
2
app/views/contacts/create.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Contacts#create</h1>
|
||||
<p>Find me in app/views/contacts/create.html.erb</p>
|
||||
2
app/views/contacts/destroy.html.erb
Normal file
2
app/views/contacts/destroy.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Contacts#destroy</h1>
|
||||
<p>Find me in app/views/contacts/destroy.html.erb</p>
|
||||
2
app/views/contacts/edit.html.erb
Normal file
2
app/views/contacts/edit.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Contacts#edit</h1>
|
||||
<p>Find me in app/views/contacts/edit.html.erb</p>
|
||||
2
app/views/contacts/index.html.erb
Normal file
2
app/views/contacts/index.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Contacts#index</h1>
|
||||
<p>Find me in app/views/contacts/index.html.erb</p>
|
||||
2
app/views/contacts/new.html.erb
Normal file
2
app/views/contacts/new.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Contacts#new</h1>
|
||||
<p>Find me in app/views/contacts/new.html.erb</p>
|
||||
2
app/views/contacts/show.html.erb
Normal file
2
app/views/contacts/show.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Contacts#show</h1>
|
||||
<p>Find me in app/views/contacts/show.html.erb</p>
|
||||
2
app/views/contacts/update.html.erb
Normal file
2
app/views/contacts/update.html.erb
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<h1>Contacts#update</h1>
|
||||
<p>Find me in app/views/contacts/update.html.erb</p>
|
||||
|
|
@ -1,4 +1,7 @@
|
|||
ContactORama::Application.routes.draw do
|
||||
|
||||
resources :contacts
|
||||
|
||||
# The priority is based upon order of creation:
|
||||
# first created -> highest priority.
|
||||
|
||||
|
|
|
|||
39
test/functional/contacts_controller_test.rb
Normal file
39
test/functional/contacts_controller_test.rb
Normal 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
|
||||
4
test/unit/helpers/contacts_helper_test.rb
Normal file
4
test/unit/helpers/contacts_helper_test.rb
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
require 'test_helper'
|
||||
|
||||
class ContactsHelperTest < ActionView::TestCase
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue