Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: scope search cleaned #1964

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/nav_bar/nav_bar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<% end %>
</li>
<li class="NavBar-item NavBar-search">
<%= form_with url: search_path, local: true, method: :get do %>
<%= form_with url: organization_search_path(organization), local: true, method: :get do %>
<label for="q" aria-label="<%= t('search.placeholder') %>"></label>
<%= c 'input',
type: :search,
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
post '/three-sixty-dialog-webhook', to: 'three_sixty_dialog_webhook#message'
end
resources :invites, only: :create
get '/search', to: 'search#index'
end
get '/search', to: 'search#index'
get '/health', to: 'health#index'
get '/about', to: 'about#index'

Expand Down
4 changes: 2 additions & 2 deletions spec/requests/search_request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
require 'rails_helper'

RSpec.describe 'Searches', type: :request do
before { create(:organization) }
let(:organization) { create(:organization) }

describe 'GET /index' do
it 'returns http success' do
get search_path(as: create(:user))
get organization_search_path(organization, as: create(:user))
expect(response).to have_http_status(:success)
end
end
Expand Down
Loading