Files
old-saburly-confighub/web/test/controllers/configuration_files_controller_test.rb
2016-02-21 11:59:13 +01:00

50 lines
1.2 KiB
Ruby

require 'test_helper'
class ConfigurationFilesControllerTest < ActionController::TestCase
setup do
@configuration_file = configuration_files(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:configuration_files)
end
test "should get new" do
get :new
assert_response :success
end
test "should create configuration_file" do
assert_difference('ConfigurationFile.count') do
post :create, configuration_file: { }
end
assert_redirected_to configuration_file_path(assigns(:configuration_file))
end
test "should show configuration_file" do
get :show, id: @configuration_file
assert_response :success
end
test "should get edit" do
get :edit, id: @configuration_file
assert_response :success
end
test "should update configuration_file" do
patch :update, id: @configuration_file, configuration_file: { }
assert_redirected_to configuration_file_path(assigns(:configuration_file))
end
test "should destroy configuration_file" do
assert_difference('ConfigurationFile.count', -1) do
delete :destroy, id: @configuration_file
end
assert_redirected_to configuration_files_path
end
end