Browse Source

Rubocop

pull/600/head
baarkerlounger 3 years ago
parent
commit
917ed378e7
  1. 2
      app/controllers/organisations_controller.rb
  2. 2
      app/controllers/users_controller.rb
  3. 3
      spec/requests/users_controller_spec.rb

2
app/controllers/organisations_controller.rb

@ -59,7 +59,7 @@ class OrganisationsController < ApplicationController
private
def filtered_users
if search_param = params["user-search-field"]
if (search_param = params["user-search-field"])
User.search_by(search_param)
else
User.all

2
app/controllers/users_controller.rb

@ -78,7 +78,7 @@ class UsersController < ApplicationController
private
def filtered_users
if search_param = params["user-search-field"]
if (search_param = params["user-search-field"])
User.search_by(search_param)
else
User.all

3
spec/requests/users_controller_spec.rb

@ -812,7 +812,6 @@ RSpec.describe UsersController, type: :request do
end
end
context "when our search term matches an email" do
let(:search_param) { "other_org@other_example.com" }
@ -824,7 +823,6 @@ RSpec.describe UsersController, type: :request do
end
end
context "when our search term matches an email and a name" do
let!(:other_user) { FactoryBot.create(:user, organisation: user.organisation, name: "joe", email: "other@example.com") }
let!(:other_org_user) { FactoryBot.create(:user, name: "User 4", email: "joe@other_example.com") }
@ -841,7 +839,6 @@ RSpec.describe UsersController, type: :request do
end
end
describe "CSV download" do
let(:headers) { { "Accept" => "text/csv" } }
let(:user) { FactoryBot.create(:user, :support) }

Loading…
Cancel
Save