demarches-normaliennes/spec
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
..
controllers app: fix JS redirection with Turbolinks disabled 2020-05-13 11:04:16 +02:00
factories Fix a crash in case of invalid geometry 2020-05-05 15:56:05 +02:00
features app: disable Turbolinks 2020-05-13 11:04:16 +02:00
fixtures create bilans_bdf_adapter 2020-04-30 16:15:16 +02:00
helpers tests for dossier_helper#demandeur_dossier 2020-04-10 13:14:39 +02:00
jobs specs: always require rails_helper 2020-03-31 12:48:32 +02:00
lib fix spec with not expired token 2020-05-06 10:57:45 +02:00
mailers precision dans mail suppression dossier en construction 2020-04-28 12:42:00 +00:00
middlewares specs: always require rails_helper 2020-03-31 12:48:32 +02:00
models Unarchive dossier when repasser_en_instruction 2020-05-12 19:05:18 +02:00
policies policies: fix champ policy for guest users 2020-04-02 11:27:14 +02:00
serializers Allow instructeurs to download a GeoJSON document for a given dossier 2020-04-30 15:49:43 +02:00
services fix flacky test 2020-05-07 10:23:28 +02:00
support specs: remove unused wait-for-ajax helper 2020-03-31 12:54:49 +02:00
views Enable republish on démarches dépubliée 2020-04-29 18:04:35 +02:00
rails_helper.rb specs: always require rails_helper 2020-03-31 12:48:32 +02:00
spec_helper.rb rspec: allow Rails to auto-migrate the test schema 2020-03-31 12:48:32 +02:00