diff test/functional/groups_controller_test.rb @ 442:753f1380d6bc cannam

Merge from branch "redmine-1.2"
author Chris Cannam
date Mon, 06 Jun 2011 14:41:04 +0100
parents cbce1fd3b1b7
children cbb26bc654de
line wrap: on
line diff
--- a/test/functional/groups_controller_test.rb	Thu Mar 03 15:08:45 2011 +0000
+++ b/test/functional/groups_controller_test.rb	Mon Jun 06 14:41:04 2011 +0100
@@ -104,4 +104,13 @@
       post :destroy_membership, :id => 10, :membership_id => 6
     end
   end
+  
+  def test_autocomplete_for_user
+    get :autocomplete_for_user, :id => 10, :q => 'mis'
+    assert_response :success
+    users = assigns(:users)
+    assert_not_nil users
+    assert users.any?
+    assert !users.include?(Group.find(10).users.first)
+  end
 end