Commit 009e4b63 authored by Justin Ho's avatar Justin Ho

Update ES controller redirect_path

Should go to Settings > General where the ES settings
are now available.
parent e7245e1b
......@@ -14,7 +14,7 @@ class Admin::ElasticsearchController < Admin::ApplicationController
flash[:warning] = _('Please create an index before enabling indexing')
end
redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
redirect_to redirect_path
end
# POST
......@@ -27,6 +27,12 @@ class Admin::ElasticsearchController < Admin::ApplicationController
flash[:notice] = _('Elasticsearch reindexing triggered')
end
redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
redirect_to redirect_path
end
private
def redirect_path
general_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
end
end
......@@ -19,7 +19,7 @@ RSpec.describe Admin::ElasticsearchController do
post :enqueue_index
expect(controller).to set_flash[:notice].to include('/admin/sidekiq/queues/elastic_full_index')
expect(response).to redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
expect(response).to redirect_to general_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
end
context 'without an index' do
......@@ -33,7 +33,7 @@ RSpec.describe Admin::ElasticsearchController do
post :enqueue_index
expect(controller).to set_flash[:warning].to include('create an index before enabling indexing')
expect(response).to redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
expect(response).to redirect_to general_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
end
end
end
......@@ -49,7 +49,7 @@ RSpec.describe Admin::ElasticsearchController do
post :trigger_reindexing
expect(controller).to set_flash[:notice].to include('reindexing triggered')
expect(response).to redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
expect(response).to redirect_to general_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
end
it 'does not create a reindexing task if there is another one' do
......@@ -59,7 +59,7 @@ RSpec.describe Admin::ElasticsearchController do
post :trigger_reindexing
expect(controller).to set_flash[:warning].to include('already in progress')
expect(response).to redirect_to integrations_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
expect(response).to redirect_to general_admin_application_settings_path(anchor: 'js-elasticsearch-settings')
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment