|
|
|
@ -359,7 +359,7 @@ RSpec.describe UsersController, type: :request do
|
|
|
|
|
|
|
|
|
|
it "shows a search bar" do |
|
|
|
|
follow_redirect! |
|
|
|
|
expect(page).to have_field("search-field", type: "search") |
|
|
|
|
expect(page).to have_field("search", type: "search") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
@ -369,7 +369,7 @@ RSpec.describe UsersController, type: :request do
|
|
|
|
|
let!(:other_org_user) { FactoryBot.create(:user, name: "User 4", email: "joe@other_example.com") } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
get "/organisations/#{user.organisation.id}/users?search-field=#{search_param}" |
|
|
|
|
get "/organisations/#{user.organisation.id}/users?search=#{search_param}" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when our search string matches case" do |
|
|
|
@ -822,12 +822,12 @@ RSpec.describe UsersController, type: :request do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it "shows a search bar" do |
|
|
|
|
expect(page).to have_field("search-field", type: "search") |
|
|
|
|
expect(page).to have_field("search", type: "search") |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when a search parameter is passed" do |
|
|
|
|
before do |
|
|
|
|
get "/users?search-field=#{search_param}" |
|
|
|
|
get "/users?search=#{search_param}" |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
context "when our search term matches a name" do |
|
|
|
|