demarches-normaliennes/spec/controllers
Pierre de La Morinerie 51cb3a04a3 app: fix JS redirection with Turbolinks disabled
When Turbolinks is enabled, a `redirect_to` in a `format: :js` request
will emit code that instructs Turbolinks to navigate to the page.
Turbolinks will then load the redirection target as HTML, and display
it.

But with Turbolinks disabled, the same `redirect_to` will instead
respond with a standard `302: redirect`. `Rails.ajax` will interpret
this redirect as "Please perform the same call again to the redirected
URL, in the same format" – and request our redirection target, but
using `format: :js`.


This breaks the "Publish procedure" button. In that case, we really want
the page to be navigated to. Add an explicit JS redirect, so that the
redirection occurs in HTML.
2020-05-13 11:04:16 +02:00
..
admin app: fix JS redirection with Turbolinks disabled 2020-05-13 11:04:16 +02:00
administrateur
administrations specs: always require rails_helper 2020-03-31 12:48:32 +02:00
api expose effectif_annuel dans api graphql 2020-04-23 09:53:27 +02:00
champs import GPX file in browser [Carto] 2020-05-11 11:36:36 +02:00
concerns specs: always require rails_helper 2020-03-31 12:48:32 +02:00
devise specs: always require rails_helper 2020-03-31 12:48:32 +02:00
france_connect Use time.zone functions instead of server time functions 2019-11-26 14:26:36 +01:00
instructeurs return bilan bdf csv for expert 2020-05-11 13:05:50 +02:00
manager Undo discard dossiers and demarches from manager 2020-03-31 17:08:28 +02:00
new_administrateur store specific api-entreprise token for a procedure 2020-04-28 15:17:11 +02:00
users make api entreprise call only if token not expired 2020-05-06 10:57:45 +02:00
api_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
application_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
attachments_controller_spec.rb attachments: remove the buggy fallback 2020-04-09 10:40:08 +02:00
invites_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
ping_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
root_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
stats_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
support_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
webhook_controller_spec.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00