Initial commit

This commit is contained in:
2013-10-08 22:10:03 -07:00
commit 5a94d69b3d
73 changed files with 1287 additions and 0 deletions

0
test/controllers/.keep Normal file
View File

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class SpacesControllerTest < ActionController::TestCase
setup do
@space = spaces(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:spaces)
end
test "should get new" do
get :new
assert_response :success
end
test "should create space" do
assert_difference('Space.count') do
post :create, space: { address: @space.address, description: @space.description, email: @space.email, hours: @space.hours, name: @space.name, phone: @space.phone, type: @space.type, website: @space.website }
end
assert_redirected_to space_path(assigns(:space))
end
test "should show space" do
get :show, id: @space
assert_response :success
end
test "should get edit" do
get :edit, id: @space
assert_response :success
end
test "should update space" do
patch :update, id: @space, space: { address: @space.address, description: @space.description, email: @space.email, hours: @space.hours, name: @space.name, phone: @space.phone, type: @space.type, website: @space.website }
assert_redirected_to space_path(assigns(:space))
end
test "should destroy space" do
assert_difference('Space.count', -1) do
delete :destroy, id: @space
end
assert_redirected_to spaces_path
end
end