Initial Commit
This commit is contained in:
45
test/functional/assets_controller_test.rb
Executable file
45
test/functional/assets_controller_test.rb
Executable file
@@ -0,0 +1,45 @@
|
||||
require 'test_helper'
|
||||
|
||||
class AssetsControllerTest < ActionController::TestCase
|
||||
test "should get index" do
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_not_nil assigns(:assets)
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get :new
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create asset" do
|
||||
assert_difference('Asset.count') do
|
||||
post :create, :asset => { }
|
||||
end
|
||||
|
||||
assert_redirected_to asset_path(assigns(:asset))
|
||||
end
|
||||
|
||||
test "should show asset" do
|
||||
get :show, :id => assets(:one).to_param
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get :edit, :id => assets(:one).to_param
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update asset" do
|
||||
put :update, :id => assets(:one).to_param, :asset => { }
|
||||
assert_redirected_to asset_path(assigns(:asset))
|
||||
end
|
||||
|
||||
test "should destroy asset" do
|
||||
assert_difference('Asset.count', -1) do
|
||||
delete :destroy, :id => assets(:one).to_param
|
||||
end
|
||||
|
||||
assert_redirected_to assets_path
|
||||
end
|
||||
end
|
||||
45
test/functional/comments_controller_test.rb
Executable file
45
test/functional/comments_controller_test.rb
Executable file
@@ -0,0 +1,45 @@
|
||||
require 'test_helper'
|
||||
|
||||
class CommentsControllerTest < ActionController::TestCase
|
||||
test "should get index" do
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_not_nil assigns(:comments)
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get :new
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create comment" do
|
||||
assert_difference('Comment.count') do
|
||||
post :create, :comment => { }
|
||||
end
|
||||
|
||||
assert_redirected_to comment_path(assigns(:comment))
|
||||
end
|
||||
|
||||
test "should show comment" do
|
||||
get :show, :id => comments(:one).to_param
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get :edit, :id => comments(:one).to_param
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update comment" do
|
||||
put :update, :id => comments(:one).to_param, :comment => { }
|
||||
assert_redirected_to comment_path(assigns(:comment))
|
||||
end
|
||||
|
||||
test "should destroy comment" do
|
||||
assert_difference('Comment.count', -1) do
|
||||
delete :destroy, :id => comments(:one).to_param
|
||||
end
|
||||
|
||||
assert_redirected_to comments_path
|
||||
end
|
||||
end
|
||||
45
test/functional/softwares_controller_test.rb
Executable file
45
test/functional/softwares_controller_test.rb
Executable file
@@ -0,0 +1,45 @@
|
||||
require 'test_helper'
|
||||
|
||||
class SoftwaresControllerTest < ActionController::TestCase
|
||||
test "should get index" do
|
||||
get :index
|
||||
assert_response :success
|
||||
assert_not_nil assigns(:softwares)
|
||||
end
|
||||
|
||||
test "should get new" do
|
||||
get :new
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should create software" do
|
||||
assert_difference('Software.count') do
|
||||
post :create, :software => { }
|
||||
end
|
||||
|
||||
assert_redirected_to software_path(assigns(:software))
|
||||
end
|
||||
|
||||
test "should show software" do
|
||||
get :show, :id => softwares(:one).to_param
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get edit" do
|
||||
get :edit, :id => softwares(:one).to_param
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should update software" do
|
||||
put :update, :id => softwares(:one).to_param, :software => { }
|
||||
assert_redirected_to software_path(assigns(:software))
|
||||
end
|
||||
|
||||
test "should destroy software" do
|
||||
assert_difference('Software.count', -1) do
|
||||
delete :destroy, :id => softwares(:one).to_param
|
||||
end
|
||||
|
||||
assert_redirected_to softwares_path
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user