Commit 85cecc0b authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix 500 error on group members search

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent cb58e1cb
......@@ -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
......
......@@ -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
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment