control 0.9.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +3 -0
- data/README.md +87 -0
- data/Rakefile +18 -0
- data/control.gemspec +19 -0
- data/db/migrate/create_transitions.rb +18 -0
- data/db/schema.rb +14 -0
- data/lib/control/errors.rb +19 -0
- data/lib/control/state.rb +135 -0
- data/lib/control/transition.rb +53 -0
- data/lib/control/workflow.rb +52 -0
- data/lib/generators/control_install/USAGE +8 -0
- data/lib/generators/control_install/control_install_generator.rb +22 -0
- data/test/lib/control/state_test.rb +80 -0
- data/test/lib/control/transition_test.rb +84 -0
- data/test/lib/control/workflow_test.rb +107 -0
- data/test/rails_app/Gemfile +22 -0
- data/test/rails_app/Gemfile.lock +130 -0
- data/test/rails_app/README.rdoc +261 -0
- data/test/rails_app/Rakefile +7 -0
- data/test/rails_app/app/assets/images/rails.png +0 -0
- data/test/rails_app/app/assets/javascripts/application.js +15 -0
- data/test/rails_app/app/assets/javascripts/assemblies.js.coffee +3 -0
- data/test/rails_app/app/assets/javascripts/boxes.js.coffee +3 -0
- data/test/rails_app/app/assets/javascripts/products.js.coffee +3 -0
- data/test/rails_app/app/assets/javascripts/rejects.js.coffee +3 -0
- data/test/rails_app/app/assets/javascripts/validates.js.coffee +3 -0
- data/test/rails_app/app/assets/stylesheets/application.css +13 -0
- data/test/rails_app/app/assets/stylesheets/assemblies.css.scss +3 -0
- data/test/rails_app/app/assets/stylesheets/boxes.css.scss +3 -0
- data/test/rails_app/app/assets/stylesheets/products.css.scss +8 -0
- data/test/rails_app/app/assets/stylesheets/rejects.css.scss +3 -0
- data/test/rails_app/app/assets/stylesheets/scaffolds.css.scss +56 -0
- data/test/rails_app/app/assets/stylesheets/validates.css.scss +3 -0
- data/test/rails_app/app/controllers/application_controller.rb +3 -0
- data/test/rails_app/app/controllers/assemblies_controller.rb +88 -0
- data/test/rails_app/app/controllers/boxes_controller.rb +88 -0
- data/test/rails_app/app/controllers/products_controller.rb +83 -0
- data/test/rails_app/app/controllers/rejects_controller.rb +88 -0
- data/test/rails_app/app/controllers/validates_controller.rb +88 -0
- data/test/rails_app/app/helpers/application_helper.rb +2 -0
- data/test/rails_app/app/helpers/assemblies_helper.rb +2 -0
- data/test/rails_app/app/helpers/boxes_helper.rb +2 -0
- data/test/rails_app/app/helpers/products_helper.rb +14 -0
- data/test/rails_app/app/helpers/rejects_helper.rb +2 -0
- data/test/rails_app/app/helpers/validates_helper.rb +2 -0
- data/test/rails_app/app/models/assembly.rb +6 -0
- data/test/rails_app/app/models/box.rb +5 -0
- data/test/rails_app/app/models/product.rb +8 -0
- data/test/rails_app/app/models/reject.rb +6 -0
- data/test/rails_app/app/models/validate.rb +6 -0
- data/test/rails_app/app/views/assemblies/_form.html.erb +24 -0
- data/test/rails_app/app/views/assemblies/edit.html.erb +6 -0
- data/test/rails_app/app/views/assemblies/index.html.erb +25 -0
- data/test/rails_app/app/views/assemblies/new.html.erb +5 -0
- data/test/rails_app/app/views/assemblies/show.html.erb +14 -0
- data/test/rails_app/app/views/boxes/_form.html.erb +24 -0
- data/test/rails_app/app/views/boxes/edit.html.erb +6 -0
- data/test/rails_app/app/views/boxes/index.html.erb +25 -0
- data/test/rails_app/app/views/boxes/new.html.erb +5 -0
- data/test/rails_app/app/views/boxes/show.html.erb +14 -0
- data/test/rails_app/app/views/layouts/application.html.erb +14 -0
- data/test/rails_app/app/views/products/_form.html.erb +21 -0
- data/test/rails_app/app/views/products/edit.html.erb +6 -0
- data/test/rails_app/app/views/products/index.html.erb +23 -0
- data/test/rails_app/app/views/products/new.html.erb +5 -0
- data/test/rails_app/app/views/products/show.html.erb +34 -0
- data/test/rails_app/app/views/rejects/_form.html.erb +20 -0
- data/test/rails_app/app/views/rejects/edit.html.erb +6 -0
- data/test/rails_app/app/views/rejects/index.html.erb +23 -0
- data/test/rails_app/app/views/rejects/new.html.erb +5 -0
- data/test/rails_app/app/views/rejects/show.html.erb +9 -0
- data/test/rails_app/app/views/validates/_form.html.erb +40 -0
- data/test/rails_app/app/views/validates/edit.html.erb +6 -0
- data/test/rails_app/app/views/validates/index.html.erb +33 -0
- data/test/rails_app/app/views/validates/new.html.erb +5 -0
- data/test/rails_app/app/views/validates/show.html.erb +35 -0
- data/test/rails_app/config.ru +4 -0
- data/test/rails_app/config/application.rb +59 -0
- data/test/rails_app/config/boot.rb +6 -0
- data/test/rails_app/config/database.yml +25 -0
- data/test/rails_app/config/environment.rb +5 -0
- data/test/rails_app/config/environments/development.rb +37 -0
- data/test/rails_app/config/environments/production.rb +67 -0
- data/test/rails_app/config/environments/test.rb +37 -0
- data/test/rails_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/rails_app/config/initializers/inflections.rb +15 -0
- data/test/rails_app/config/initializers/mime_types.rb +5 -0
- data/test/rails_app/config/initializers/secret_token.rb +7 -0
- data/test/rails_app/config/initializers/session_store.rb +8 -0
- data/test/rails_app/config/initializers/wrap_parameters.rb +14 -0
- data/test/rails_app/config/locales/en.yml +5 -0
- data/test/rails_app/config/routes.rb +68 -0
- data/test/rails_app/db/development.sqlite3 +0 -0
- data/test/rails_app/db/migrate/20120126165218_create_products.rb +8 -0
- data/test/rails_app/db/migrate/20120126165821_add_codename_to_products.rb +6 -0
- data/test/rails_app/db/migrate/20120126173019_create_validates.rb +14 -0
- data/test/rails_app/db/migrate/20120126173232_create_assemblies.rb +10 -0
- data/test/rails_app/db/migrate/20120126173516_create_boxes.rb +10 -0
- data/test/rails_app/db/migrate/20120126173539_create_rejects.rb +9 -0
- data/test/rails_app/db/migrate/20120126174101_create_transitions.rb +18 -0
- data/test/rails_app/db/schema.rb +64 -0
- data/test/rails_app/db/seeds.rb +7 -0
- data/test/rails_app/db/test.sqlite3 +0 -0
- data/test/rails_app/doc/README_FOR_APP +2 -0
- data/test/rails_app/log/development.log +8963 -0
- data/test/rails_app/log/test.log +321 -0
- data/test/rails_app/public/404.html +26 -0
- data/test/rails_app/public/422.html +26 -0
- data/test/rails_app/public/500.html +25 -0
- data/test/rails_app/public/favicon.ico +0 -0
- data/test/rails_app/public/index.html.old +241 -0
- data/test/rails_app/public/robots.txt +5 -0
- data/test/rails_app/script/rails +6 -0
- data/test/rails_app/test/fixtures/assemblies.yml +9 -0
- data/test/rails_app/test/fixtures/boxes.yml +9 -0
- data/test/rails_app/test/fixtures/products.yml +11 -0
- data/test/rails_app/test/fixtures/rejects.yml +7 -0
- data/test/rails_app/test/fixtures/validates.yml +17 -0
- data/test/rails_app/test/functional/assemblies_controller_test.rb +49 -0
- data/test/rails_app/test/functional/boxes_controller_test.rb +49 -0
- data/test/rails_app/test/functional/products_controller_test.rb +49 -0
- data/test/rails_app/test/functional/rejects_controller_test.rb +49 -0
- data/test/rails_app/test/functional/validates_controller_test.rb +49 -0
- data/test/rails_app/test/performance/browsing_test.rb +12 -0
- data/test/rails_app/test/test_helper.rb +13 -0
- data/test/rails_app/test/unit/assembly_test.rb +7 -0
- data/test/rails_app/test/unit/box_test.rb +7 -0
- data/test/rails_app/test/unit/helpers/assemblies_helper_test.rb +4 -0
- data/test/rails_app/test/unit/helpers/boxes_helper_test.rb +4 -0
- data/test/rails_app/test/unit/helpers/products_helper_test.rb +4 -0
- data/test/rails_app/test/unit/helpers/rejects_helper_test.rb +4 -0
- data/test/rails_app/test/unit/helpers/validates_helper_test.rb +4 -0
- data/test/rails_app/test/unit/product_test.rb +7 -0
- data/test/rails_app/test/unit/reject_test.rb +7 -0
- data/test/rails_app/test/unit/validate_test.rb +7 -0
- data/test/rails_app/tmp/cache/assets/CD7/6F0/sprockets%2Fbd3936370d0f952ada5774e2230046ed +0 -0
- data/test/rails_app/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
- data/test/rails_app/tmp/cache/assets/CDF/890/sprockets%2F1380c8a9a90c9434c33ea3a2b759546f +0 -0
- data/test/rails_app/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 +0 -0
- data/test/rails_app/tmp/cache/assets/CF1/E50/sprockets%2F627ffd39f3642a2a236775d77839fac3 +0 -0
- data/test/rails_app/tmp/cache/assets/CFC/170/sprockets%2F80efc018414af123b11d0c6485e87b1b +0 -0
- data/test/rails_app/tmp/cache/assets/D0B/B40/sprockets%2F2eace11b521905c77d38470c975fa28a +0 -0
- data/test/rails_app/tmp/cache/assets/D13/8E0/sprockets%2F4476d1e237763ebe413a93e0ae559e6b +0 -0
- data/test/rails_app/tmp/cache/assets/D13/E20/sprockets%2F382583b312ba3d6f09b596f6bb63a98b +0 -0
- data/test/rails_app/tmp/cache/assets/D15/750/sprockets%2F4cc25a6e69224dc83fed65a4242479c5 +0 -0
- data/test/rails_app/tmp/cache/assets/D1B/3B0/sprockets%2F0098fc768cb8d9c834fcb13163c85b54 +0 -0
- data/test/rails_app/tmp/cache/assets/D20/C40/sprockets%2F46d84fd895a96b157269bd6b7bae2623 +0 -0
- data/test/rails_app/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
- data/test/rails_app/tmp/cache/assets/D3F/4A0/sprockets%2Fba62c891c908a4219fb4d2005f886aee +0 -0
- data/test/rails_app/tmp/cache/assets/D45/C10/sprockets%2F29eede3408740d29d159a8367d1abe4e +0 -0
- data/test/rails_app/tmp/cache/assets/D4B/EC0/sprockets%2Fb261fa987a3e88f07b352eba69495e3b +0 -0
- data/test/rails_app/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
- data/test/rails_app/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
- data/test/rails_app/tmp/cache/assets/D65/620/sprockets%2Fc821c64ad244b34cd1c92ce6e4844f2a +0 -0
- data/test/rails_app/tmp/cache/assets/D78/F10/sprockets%2Fc81a77308c5e0c2b8efc69bece538149 +0 -0
- data/test/rails_app/tmp/cache/assets/D7B/040/sprockets%2F2ea981ebd7b7a34bd9d75f626f81c526 +0 -0
- data/test/rails_app/tmp/cache/assets/D9C/4A0/sprockets%2Fc15750bf0161f2878cf9da9bb1a84ecb +0 -0
- data/test/rails_app/tmp/cache/assets/DA2/120/sprockets%2Fdfd12e4fb8ce07a2d3c4856974a2f4e3 +0 -0
- data/test/rails_app/tmp/cache/assets/DA9/180/sprockets%2F1eca18f8334b5ce5f73e18d778bc7e3b +0 -0
- data/test/rails_app/tmp/cache/assets/DB4/120/sprockets%2Fc4ad185fad2acc8f1133bb2a80f400d7 +0 -0
- data/test/rails_app/tmp/cache/assets/DD2/B40/sprockets%2Ff8f229b2c6e61975aca38da7a1cb7b8c +0 -0
- data/test/rails_app/tmp/cache/assets/DD5/CF0/sprockets%2Fac6d0c5baedfe70588f57e99b0c4c722 +0 -0
- data/test/rails_app/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
- data/test/rails_app/tmp/cache/assets/DDD/AE0/sprockets%2F524b597ade6bc1d79c9a4ffd6e3682bd +0 -0
- data/test/rails_app/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
- data/test/rails_app/tmp/cache/assets/E06/E60/sprockets%2F1afcf29a4e0c835cb47d9bf28cf8a86b +0 -0
- data/test/rails_app/tmp/cache/assets/E19/2A0/sprockets%2F10fcfbe6ebae11a40c8eac41939a1b9a +0 -0
- data/test/rails_app/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 +0 -0
- data/test/rails_app/tmp/cache/assets/E35/980/sprockets%2Fa5beac77f747ffbc71d32edecf38904a +0 -0
- data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/assemblies.css.scssc +0 -0
- data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/boxes.css.scssc +0 -0
- data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/products.css.scssc +0 -0
- data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/rejects.css.scssc +0 -0
- data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/scaffolds.css.scssc +0 -0
- data/test/rails_app/tmp/cache/sass/0caf4829b2adaabee514492a80140305d59a00b9/validates.css.scssc +0 -0
- data/test/test_helper.rb +67 -0
- data/test/test_schema.rb +32 -0
- metadata +210 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
|
3
|
+
|
|
4
|
+
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
|
5
|
+
require File.expand_path('../../config/boot', __FILE__)
|
|
6
|
+
require 'rails/commands'
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
|
2
|
+
|
|
3
|
+
# This model initially had no columns defined. If you add columns to the
|
|
4
|
+
# model remove the '{}' from the fixture names and add the columns immediately
|
|
5
|
+
# below each fixture, per the syntax in the comments below
|
|
6
|
+
#
|
|
7
|
+
one: {}
|
|
8
|
+
# column: value
|
|
9
|
+
#
|
|
10
|
+
two: {}
|
|
11
|
+
# column: value
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html
|
|
2
|
+
|
|
3
|
+
one:
|
|
4
|
+
standing_test: false
|
|
5
|
+
sitting_test: false
|
|
6
|
+
fat_guy_test: false
|
|
7
|
+
evel_knievel_jumping_test: false
|
|
8
|
+
tester: MyString
|
|
9
|
+
product_id: 1
|
|
10
|
+
|
|
11
|
+
two:
|
|
12
|
+
standing_test: false
|
|
13
|
+
sitting_test: false
|
|
14
|
+
fat_guy_test: false
|
|
15
|
+
evel_knievel_jumping_test: false
|
|
16
|
+
tester: MyString
|
|
17
|
+
product_id: 1
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class AssembliesControllerTest < ActionController::TestCase
|
|
4
|
+
setup do
|
|
5
|
+
@assembly = assemblies(:one)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get :index
|
|
10
|
+
assert_response :success
|
|
11
|
+
assert_not_nil assigns(:assemblies)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
test "should get new" do
|
|
15
|
+
get :new
|
|
16
|
+
assert_response :success
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
test "should create assembly" do
|
|
20
|
+
assert_difference('Assembly.count') do
|
|
21
|
+
post :create, assembly: @assembly.attributes
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
assert_redirected_to assembly_path(assigns(:assembly))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
test "should show assembly" do
|
|
28
|
+
get :show, id: @assembly
|
|
29
|
+
assert_response :success
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
test "should get edit" do
|
|
33
|
+
get :edit, id: @assembly
|
|
34
|
+
assert_response :success
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
test "should update assembly" do
|
|
38
|
+
put :update, id: @assembly, assembly: @assembly.attributes
|
|
39
|
+
assert_redirected_to assembly_path(assigns(:assembly))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
test "should destroy assembly" do
|
|
43
|
+
assert_difference('Assembly.count', -1) do
|
|
44
|
+
delete :destroy, id: @assembly
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
assert_redirected_to assemblies_path
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class BoxesControllerTest < ActionController::TestCase
|
|
4
|
+
setup do
|
|
5
|
+
@box = boxes(:one)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get :index
|
|
10
|
+
assert_response :success
|
|
11
|
+
assert_not_nil assigns(:boxes)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
test "should get new" do
|
|
15
|
+
get :new
|
|
16
|
+
assert_response :success
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
test "should create box" do
|
|
20
|
+
assert_difference('Box.count') do
|
|
21
|
+
post :create, box: @box.attributes
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
assert_redirected_to box_path(assigns(:box))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
test "should show box" do
|
|
28
|
+
get :show, id: @box
|
|
29
|
+
assert_response :success
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
test "should get edit" do
|
|
33
|
+
get :edit, id: @box
|
|
34
|
+
assert_response :success
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
test "should update box" do
|
|
38
|
+
put :update, id: @box, box: @box.attributes
|
|
39
|
+
assert_redirected_to box_path(assigns(:box))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
test "should destroy box" do
|
|
43
|
+
assert_difference('Box.count', -1) do
|
|
44
|
+
delete :destroy, id: @box
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
assert_redirected_to boxes_path
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class ProductsControllerTest < ActionController::TestCase
|
|
4
|
+
setup do
|
|
5
|
+
@product = products(:one)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get :index
|
|
10
|
+
assert_response :success
|
|
11
|
+
assert_not_nil assigns(:products)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
test "should get new" do
|
|
15
|
+
get :new
|
|
16
|
+
assert_response :success
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
test "should create product" do
|
|
20
|
+
assert_difference('Product.count') do
|
|
21
|
+
post :create, product: @product.attributes
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
assert_redirected_to product_path(assigns(:product))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
test "should show product" do
|
|
28
|
+
get :show, id: @product
|
|
29
|
+
assert_response :success
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
test "should get edit" do
|
|
33
|
+
get :edit, id: @product
|
|
34
|
+
assert_response :success
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
test "should update product" do
|
|
38
|
+
put :update, id: @product, product: @product.attributes
|
|
39
|
+
assert_redirected_to product_path(assigns(:product))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
test "should destroy product" do
|
|
43
|
+
assert_difference('Product.count', -1) do
|
|
44
|
+
delete :destroy, id: @product
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
assert_redirected_to products_path
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class RejectsControllerTest < ActionController::TestCase
|
|
4
|
+
setup do
|
|
5
|
+
@reject = rejects(:one)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get :index
|
|
10
|
+
assert_response :success
|
|
11
|
+
assert_not_nil assigns(:rejects)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
test "should get new" do
|
|
15
|
+
get :new
|
|
16
|
+
assert_response :success
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
test "should create reject" do
|
|
20
|
+
assert_difference('Reject.count') do
|
|
21
|
+
post :create, reject: @reject.attributes
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
assert_redirected_to reject_path(assigns(:reject))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
test "should show reject" do
|
|
28
|
+
get :show, id: @reject
|
|
29
|
+
assert_response :success
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
test "should get edit" do
|
|
33
|
+
get :edit, id: @reject
|
|
34
|
+
assert_response :success
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
test "should update reject" do
|
|
38
|
+
put :update, id: @reject, reject: @reject.attributes
|
|
39
|
+
assert_redirected_to reject_path(assigns(:reject))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
test "should destroy reject" do
|
|
43
|
+
assert_difference('Reject.count', -1) do
|
|
44
|
+
delete :destroy, id: @reject
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
assert_redirected_to rejects_path
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
|
|
3
|
+
class ValidatesControllerTest < ActionController::TestCase
|
|
4
|
+
setup do
|
|
5
|
+
@validate = validates(:one)
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
test "should get index" do
|
|
9
|
+
get :index
|
|
10
|
+
assert_response :success
|
|
11
|
+
assert_not_nil assigns(:validates)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
test "should get new" do
|
|
15
|
+
get :new
|
|
16
|
+
assert_response :success
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
test "should create validate" do
|
|
20
|
+
assert_difference('Validate.count') do
|
|
21
|
+
post :create, validate: @validate.attributes
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
assert_redirected_to validate_path(assigns(:validate))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
test "should show validate" do
|
|
28
|
+
get :show, id: @validate
|
|
29
|
+
assert_response :success
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
test "should get edit" do
|
|
33
|
+
get :edit, id: @validate
|
|
34
|
+
assert_response :success
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
test "should update validate" do
|
|
38
|
+
put :update, id: @validate, validate: @validate.attributes
|
|
39
|
+
assert_redirected_to validate_path(assigns(:validate))
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
test "should destroy validate" do
|
|
43
|
+
assert_difference('Validate.count', -1) do
|
|
44
|
+
delete :destroy, id: @validate
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
assert_redirected_to validates_path
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
require 'test_helper'
|
|
2
|
+
require 'rails/performance_test_help'
|
|
3
|
+
|
|
4
|
+
class BrowsingTest < ActionDispatch::PerformanceTest
|
|
5
|
+
# Refer to the documentation for all available options
|
|
6
|
+
# self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
|
|
7
|
+
# :output => 'tmp/performance', :formats => [:flat] }
|
|
8
|
+
|
|
9
|
+
def test_homepage
|
|
10
|
+
get '/'
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
|
2
|
+
require File.expand_path('../../config/environment', __FILE__)
|
|
3
|
+
require 'rails/test_help'
|
|
4
|
+
|
|
5
|
+
class ActiveSupport::TestCase
|
|
6
|
+
# Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
|
|
7
|
+
#
|
|
8
|
+
# Note: You'll currently still have to declare fixtures explicitly in integration tests
|
|
9
|
+
# -- they do not yet inherit this setting
|
|
10
|
+
fixtures :all
|
|
11
|
+
|
|
12
|
+
# Add more helper methods to be used by all tests here...
|
|
13
|
+
end
|
|
Binary file
|
|
Binary file
|