upgraded to rails

This commit is contained in:
ablwr
2014-08-03 21:43:33 -04:00
parent 5366626046
commit 181c4340f7
82 changed files with 3760 additions and 1 deletions

0
test/controllers/.keep Normal file
View File

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class FormsControllerTest < ActionController::TestCase
setup do
@form = forms(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:forms)
end
test "should get new" do
get :new
assert_response :success
end
test "should create form" do
assert_difference('Form.count') do
post :create, form: { }
end
assert_redirected_to form_path(assigns(:form))
end
test "should show form" do
get :show, id: @form
assert_response :success
end
test "should get edit" do
get :edit, id: @form
assert_response :success
end
test "should update form" do
patch :update, id: @form, form: { }
assert_redirected_to form_path(assigns(:form))
end
test "should destroy form" do
assert_difference('Form.count', -1) do
delete :destroy, id: @form
end
assert_redirected_to forms_path
end
end

0
test/fixtures/.keep vendored Normal file
View File

11
test/fixtures/forms.yml vendored Normal file
View File

@@ -0,0 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value

0
test/helpers/.keep Normal file
View File

View File

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

0
test/integration/.keep Normal file
View File

0
test/mailers/.keep Normal file
View File

0
test/models/.keep Normal file
View File

7
test/models/form_test.rb Normal file
View File

@@ -0,0 +1,7 @@
require 'test_helper'
class FormTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

10
test/test_helper.rb Normal file
View File

@@ -0,0 +1,10 @@
ENV['RAILS_ENV'] ||= 'test'
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
class ActiveSupport::TestCase
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
fixtures :all
# Add more helper methods to be used by all tests here...
end