diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-16 11:43:58 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-16 11:43:58 +0000 |
commit | 6dfd88a145b7c7f9dc798d888a2aa4ad5c1c54b7 (patch) | |
tree | 386a7e8e5d9638a811e0473d644e4e0c01af3410 | |
parent | 8fa47d005852732adcf75dd06d2ab420520f1e34 (diff) | |
parent | 85cecc0b2ef25ef4e4dc56583b0e202400168abb (diff) | |
download | gitlab-ce-6dfd88a145b7c7f9dc798d888a2aa4ad5c1c54b7.tar.gz |
Merge branch 'fix-group-members-search' into 'master'
Fix group members search
Postgres only.
500 error when try to search group members on `/groups/:group_id/members` page
-rw-r--r-- | app/controllers/groups_controller.rb | 2 | ||||
-rw-r--r-- | features/group.feature | 7 | ||||
-rw-r--r-- | features/steps/group/group.rb | 7 |
3 files changed, 15 insertions, 1 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index a3019b3ac78..ddaae6f0e8c 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -68,7 +68,7 @@ class GroupsController < ApplicationController @members = group.users_groups if params[:search].present? - users = group.users.search(params[:search]) + users = group.users.search(params[:search]).to_a @members = @members.where(user_id: users) end diff --git a/features/group.feature b/features/group.feature index 4e11bcba939..71c28c07a3c 100644 --- a/features/group.feature +++ b/features/group.feature @@ -113,3 +113,10 @@ Feature: Groups Then I should see user "John Doe" in team list Then I should see user "Mary Jane" in team list Then I should not see the "Remove User From Group" button for "Mary Jane" + + Scenario: Search member by name + Given "Mary Jane" is guest of group "Guest" + And I visit group "Guest" members page + When I search for 'Mary' member + Then I should see user "Mary Jane" in team list + Then I should not see user "John Doe" in team list diff --git a/features/steps/group/group.rb b/features/steps/group/group.rb index 81472d1ca35..820d0ef2a1f 100644 --- a/features/steps/group/group.rb +++ b/features/steps/group/group.rb @@ -157,6 +157,13 @@ class Groups < Spinach::FeatureSteps # poltergeist always confirms popups. end + step 'I search for \'Mary\' member' do + within '.member-search-form' do + fill_in 'search', with: 'Mary' + click_button 'Search' + end + end + protected def assigned_to_me key |