diff options
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/group_memberships_controller_test.rb | 49 | ||||
-rw-r--r-- | test/functional/group_permissions_controller_test.rb | 49 | ||||
-rw-r--r-- | test/functional/groups_controller_test.rb | 49 | ||||
-rw-r--r-- | test/functional/restore_jobs_controller_test.rb | 49 |
4 files changed, 196 insertions, 0 deletions
diff --git a/test/functional/group_memberships_controller_test.rb b/test/functional/group_memberships_controller_test.rb new file mode 100644 index 0000000..596de1f --- /dev/null +++ b/test/functional/group_memberships_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class GroupMembershipsControllerTest < ActionController::TestCase + setup do + @group_membership = group_memberships(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:group_memberships) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create group_membership" do + assert_difference('GroupMembership.count') do + post :create, group_membership: @group_membership.attributes + end + + assert_redirected_to group_membership_path(assigns(:group_membership)) + end + + test "should show group_membership" do + get :show, id: @group_membership.to_param + assert_response :success + end + + test "should get edit" do + get :edit, id: @group_membership.to_param + assert_response :success + end + + test "should update group_membership" do + put :update, id: @group_membership.to_param, group_membership: @group_membership.attributes + assert_redirected_to group_membership_path(assigns(:group_membership)) + end + + test "should destroy group_membership" do + assert_difference('GroupMembership.count', -1) do + delete :destroy, id: @group_membership.to_param + end + + assert_redirected_to group_memberships_path + end +end diff --git a/test/functional/group_permissions_controller_test.rb b/test/functional/group_permissions_controller_test.rb new file mode 100644 index 0000000..4b70ae3 --- /dev/null +++ b/test/functional/group_permissions_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class GroupPermissionsControllerTest < ActionController::TestCase + setup do + @group_permission = group_permissions(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:group_permissions) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create group_permission" do + assert_difference('GroupPermission.count') do + post :create, group_permission: @group_permission.attributes + end + + assert_redirected_to group_permission_path(assigns(:group_permission)) + end + + test "should show group_permission" do + get :show, id: @group_permission.to_param + assert_response :success + end + + test "should get edit" do + get :edit, id: @group_permission.to_param + assert_response :success + end + + test "should update group_permission" do + put :update, id: @group_permission.to_param, group_permission: @group_permission.attributes + assert_redirected_to group_permission_path(assigns(:group_permission)) + end + + test "should destroy group_permission" do + assert_difference('GroupPermission.count', -1) do + delete :destroy, id: @group_permission.to_param + end + + assert_redirected_to group_permissions_path + end +end diff --git a/test/functional/groups_controller_test.rb b/test/functional/groups_controller_test.rb new file mode 100644 index 0000000..2981018 --- /dev/null +++ b/test/functional/groups_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class GroupsControllerTest < ActionController::TestCase + setup do + @group = groups(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:groups) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create group" do + assert_difference('Group.count') do + post :create, group: @group.attributes + end + + assert_redirected_to group_path(assigns(:group)) + end + + test "should show group" do + get :show, id: @group.to_param + assert_response :success + end + + test "should get edit" do + get :edit, id: @group.to_param + assert_response :success + end + + test "should update group" do + put :update, id: @group.to_param, group: @group.attributes + assert_redirected_to group_path(assigns(:group)) + end + + test "should destroy group" do + assert_difference('Group.count', -1) do + delete :destroy, id: @group.to_param + end + + assert_redirected_to groups_path + end +end diff --git a/test/functional/restore_jobs_controller_test.rb b/test/functional/restore_jobs_controller_test.rb new file mode 100644 index 0000000..bd06b25 --- /dev/null +++ b/test/functional/restore_jobs_controller_test.rb @@ -0,0 +1,49 @@ +require 'test_helper' + +class RestoreJobsControllerTest < ActionController::TestCase + setup do + @restore_job = restore_jobs(:one) + end + + test "should get index" do + get :index + assert_response :success + assert_not_nil assigns(:restore_jobs) + end + + test "should get new" do + get :new + assert_response :success + end + + test "should create restore_job" do + assert_difference('RestoreJob.count') do + post :create, restore_job: @restore_job.attributes + end + + assert_redirected_to restore_job_path(assigns(:restore_job)) + end + + test "should show restore_job" do + get :show, id: @restore_job.to_param + assert_response :success + end + + test "should get edit" do + get :edit, id: @restore_job.to_param + assert_response :success + end + + test "should update restore_job" do + put :update, id: @restore_job.to_param, restore_job: @restore_job.attributes + assert_redirected_to restore_job_path(assigns(:restore_job)) + end + + test "should destroy restore_job" do + assert_difference('RestoreJob.count', -1) do + delete :destroy, id: @restore_job.to_param + end + + assert_redirected_to restore_jobs_path + end +end |