diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-27 12:22:29 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-02-27 12:22:29 +0100 |
commit | 67c1a0a951403a546250ea860a3e3d199cae2fce (patch) | |
tree | f86ec6cedf081a1a57005eca1661e9bead34e4de /test/functional/groups_controller_test.rb | |
parent | 5d8ce5f4775ac8bc5f523964e6e36f63ff3c4683 (diff) | |
parent | 211f558a86ae30cdd5b392ab1376e1393f97e22c (diff) |
Merge branch 'develop'5.1-beta6
Diffstat (limited to 'test/functional/groups_controller_test.rb')
-rw-r--r-- | test/functional/groups_controller_test.rb | 49 |
1 files changed, 49 insertions, 0 deletions
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 |