summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2018-02-15 08:19:22 +0000
committerRémy Coutable <remy@rymai.me>2018-02-15 08:19:22 +0000
commit677951e32a77d969fb3dd39ebbac8865e496e977 (patch)
treed21a0ea5ffab420566481f8281aef768e1de87bc /spec
parente78d358bdc50298f61f4730b7224e77b2438a870 (diff)
parent5b5557c67c43387c02345ecf0636bfcf9ef8ec0d (diff)
downloadgitlab-ce-677951e32a77d969fb3dd39ebbac8865e496e977.tar.gz
Merge branch 'group-search-members-rspec' into 'master'
Move feature group members search test to RSpec See merge request gitlab-org/gitlab-ce!17050
Diffstat (limited to 'spec')
-rw-r--r--spec/features/groups/members/search_members_spec.rb29
1 files changed, 29 insertions, 0 deletions
diff --git a/spec/features/groups/members/search_members_spec.rb b/spec/features/groups/members/search_members_spec.rb
new file mode 100644
index 00000000000..31fbbcf562c
--- /dev/null
+++ b/spec/features/groups/members/search_members_spec.rb
@@ -0,0 +1,29 @@
+require 'spec_helper'
+
+describe 'Search group member' do
+ let(:user) { create :user }
+ let(:member) { create :user }
+
+ let!(:guest_group) do
+ create(:group) do |group|
+ group.add_guest(user)
+ group.add_guest(member)
+ end
+ end
+
+ before do
+ sign_in(user)
+ visit group_group_members_path(guest_group)
+ end
+
+ it 'renders member users' do
+ page.within '.member-search-form' do
+ fill_in 'search', with: member.name
+ find('.member-search-btn').click
+ end
+
+ group_members_list = find(".panel .content-list")
+ expect(group_members_list).to have_content(member.name)
+ expect(group_members_list).not_to have_content(user.name)
+ end
+end