Initial commit

This commit is contained in:
2011-09-28 03:37:39 -07:00
commit b1fbb339c2
373 changed files with 52305 additions and 0 deletions

9
test/fixtures/contract_templates.yml vendored Normal file
View File

@@ -0,0 +1,9 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
name: MyString
boilerplate: MyString
two:
name: MyString
boilerplate: MyString

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

@@ -0,0 +1,11 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
boilerplate: MyString
signature:
hash: MyString
two:
boilerplate: MyString
signature:
hash: MyString

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

@@ -0,0 +1,11 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
one:
first_name: MyString
last_name: MyString
cosigner: MyString
two:
first_name: MyString
last_name: MyString
cosigner: MyString

View File

@@ -0,0 +1,45 @@
require 'test_helper'
class ContractTemplatesControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:contract_templates)
end
test "should get new" do
get :new
assert_response :success
end
test "should create contract_template" do
assert_difference('ContractTemplate.count') do
post :create, :contract_template => { }
end
assert_redirected_to contract_template_path(assigns(:contract_template))
end
test "should show contract_template" do
get :show, :id => contract_templates(:one).to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => contract_templates(:one).to_param
assert_response :success
end
test "should update contract_template" do
put :update, :id => contract_templates(:one).to_param, :contract_template => { }
assert_redirected_to contract_template_path(assigns(:contract_template))
end
test "should destroy contract_template" do
assert_difference('ContractTemplate.count', -1) do
delete :destroy, :id => contract_templates(:one).to_param
end
assert_redirected_to contract_templates_path
end
end

View File

@@ -0,0 +1,45 @@
require 'test_helper'
class ContractsControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:contracts)
end
test "should get new" do
get :new
assert_response :success
end
test "should create contract" do
assert_difference('Contract.count') do
post :create, :contract => { }
end
assert_redirected_to contract_path(assigns(:contract))
end
test "should show contract" do
get :show, :id => contracts(:one).to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => contracts(:one).to_param
assert_response :success
end
test "should update contract" do
put :update, :id => contracts(:one).to_param, :contract => { }
assert_redirected_to contract_path(assigns(:contract))
end
test "should destroy contract" do
assert_difference('Contract.count', -1) do
delete :destroy, :id => contracts(:one).to_param
end
assert_redirected_to contracts_path
end
end

View File

@@ -0,0 +1,45 @@
require 'test_helper'
class SignersControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:signers)
end
test "should get new" do
get :new
assert_response :success
end
test "should create signer" do
assert_difference('Signer.count') do
post :create, :signer => { }
end
assert_redirected_to signer_path(assigns(:signer))
end
test "should show signer" do
get :show, :id => signers(:one).to_param
assert_response :success
end
test "should get edit" do
get :edit, :id => signers(:one).to_param
assert_response :success
end
test "should update signer" do
put :update, :id => signers(:one).to_param, :signer => { }
assert_redirected_to signer_path(assigns(:signer))
end
test "should destroy signer" do
assert_difference('Signer.count', -1) do
delete :destroy, :id => signers(:one).to_param
end
assert_redirected_to signers_path
end
end

View File

@@ -0,0 +1,9 @@
require 'test_helper'
require 'performance_test_help'
# Profiling results for each test method are written to tmp/performance.
class BrowsingTest < ActionController::PerformanceTest
def test_homepage
get '/'
end
end

38
test/test_helper.rb Normal file
View File

@@ -0,0 +1,38 @@
ENV["RAILS_ENV"] = "test"
require File.expand_path(File.dirname(__FILE__) + "/../config/environment")
require 'test_help'
class ActiveSupport::TestCase
# Transactional fixtures accelerate your tests by wrapping each test method
# in a transaction that's rolled back on completion. This ensures that the
# test database remains unchanged so your fixtures don't have to be reloaded
# between every test method. Fewer database queries means faster tests.
#
# Read Mike Clark's excellent walkthrough at
# http://clarkware.com/cgi/blosxom/2005/10/24#Rails10FastTesting
#
# Every Active Record database supports transactions except MyISAM tables
# in MySQL. Turn off transactional fixtures in this case; however, if you
# don't care one way or the other, switching from MyISAM to InnoDB tables
# is recommended.
#
# The only drawback to using transactional fixtures is when you actually
# need to test transactions. Since your test is bracketed by a transaction,
# any transactions started in your code will be automatically rolled back.
self.use_transactional_fixtures = true
# Instantiated fixtures are slow, but give you @david where otherwise you
# would need people(:david). If you don't want to migrate your existing
# test cases which use the @david style and don't mind the speed hit (each
# instantiated fixtures translates to a database query per test method),
# then set this back to true.
self.use_instantiated_fixtures = false
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
#
# Note: You'll currently still have to declare fixtures explicitly in integration tests
# -- they do not yet inherit this setting
fixtures :all
# Add more helper methods to be used by all tests here...
end

View File

@@ -0,0 +1,8 @@
require 'test_helper'
class ContractTemplateTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end

View File

@@ -0,0 +1,8 @@
require 'test_helper'
class ContractTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end

View File

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

View File

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

View File

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

8
test/unit/signer_test.rb Normal file
View File

@@ -0,0 +1,8 @@
require 'test_helper'
class SignerTest < ActiveSupport::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end