created template selecting

This commit is contained in:
Senad Uka
2016-02-21 11:59:13 +01:00
parent 7af44a6245
commit 709ce3e38c
46 changed files with 584 additions and 20 deletions

View File

@@ -0,0 +1,49 @@
require 'test_helper'
class ConfigurationTemplatesControllerTest < ActionController::TestCase
setup do
@configuration_template = configuration_templates(:one)
end
test "should get index" do
get :index
assert_response :success
assert_not_nil assigns(:configuration_templates)
end
test "should get new" do
get :new
assert_response :success
end
test "should create configuration_template" do
assert_difference('ConfigurationTemplate.count') do
post :create, configuration_template: { }
end
assert_redirected_to configuration_template_path(assigns(:configuration_template))
end
test "should show configuration_template" do
get :show, id: @configuration_template
assert_response :success
end
test "should get edit" do
get :edit, id: @configuration_template
assert_response :success
end
test "should update configuration_template" do
patch :update, id: @configuration_template, configuration_template: { }
assert_redirected_to configuration_template_path(assigns(:configuration_template))
end
test "should destroy configuration_template" do
assert_difference('ConfigurationTemplate.count', -1) do
delete :destroy, id: @configuration_template
end
assert_redirected_to configuration_templates_path
end
end