Sha256: 6fee482874b48c1f6b5c73f2341819f88d22d18c50ebde595c079df23e8dad82

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

require 'test_helper'

class AccessGroupsControllerTest < ActionController::TestCase

  setup do
    @access_group = access_groups(:one)
    @admin = users(:admin)
    log_in_as(@admin)
  end

  test "should get index" do
    get :index
    assert_response :success
    assert_not_nil assigns(:access_groups)
  end

  test "should get new" do
    get :new
    assert_response :success
  end

  test "should create access_group" do
    assert_difference('AccessGroup.count') do
      post :create, access_group: { name: 'Access Group X' }
    end

    assert_redirected_to access_groups_url
  end

  test "should show access_group" do
    get :show, id: @access_group
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @access_group
    assert_response :success
  end

  test "should update access_group" do
    patch :update, id: @access_group, access_group: { name: 'Access Group X'  }
    assert_redirected_to access_groups_url
  end

  test "should destroy access_group" do
    assert_difference('AccessGroup.count', -1) do
      delete :destroy, id: @access_group
    end

    assert_redirected_to access_groups_path
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
barkest_core-1.5.4.0 test/controllers/access_groups_controller_test.rb
barkest_core-1.5.3.0 test/controllers/access_groups_controller_test.rb