Skip to content

Commit

Permalink
add spec for phones search
Browse files Browse the repository at this point in the history
  • Loading branch information
markets committed Feb 25, 2020
1 parent cb77393 commit d977d53
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/controllers/users_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,17 @@
end
end
end

context 'when searching' do
it 'allows to search by phone' do
user = Fabricate(:user, phone: 123456789)
member = Fabricate(:member, user: user, organization: test_organization)

get :manage, q: { user_username_or_user_email_or_user_phone_or_user_alt_phone_or_member_uid_search_contains: 123456789 }

expect(assigns(:members)).to include(member)
end
end
end

describe "GET #show" do
Expand Down

0 comments on commit d977d53

Please sign in to comment.