mirror of
https://github.com/amiaopensource/ffmprovisr.git
synced 2025-10-25 23:20:54 +02:00
upgraded to rails
This commit is contained in:
0
test/controllers/.keep
Normal file
0
test/controllers/.keep
Normal file
49
test/controllers/forms_controller_test.rb
Normal file
49
test/controllers/forms_controller_test.rb
Normal 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
0
test/fixtures/.keep
vendored
Normal file
11
test/fixtures/forms.yml
vendored
Normal file
11
test/fixtures/forms.yml
vendored
Normal 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
0
test/helpers/.keep
Normal file
4
test/helpers/forms_helper_test.rb
Normal file
4
test/helpers/forms_helper_test.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
require 'test_helper'
|
||||
|
||||
class FormsHelperTest < ActionView::TestCase
|
||||
end
|
||||
0
test/integration/.keep
Normal file
0
test/integration/.keep
Normal file
0
test/mailers/.keep
Normal file
0
test/mailers/.keep
Normal file
0
test/models/.keep
Normal file
0
test/models/.keep
Normal file
7
test/models/form_test.rb
Normal file
7
test/models/form_test.rb
Normal 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
10
test/test_helper.rb
Normal 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
|
||||
Reference in New Issue
Block a user