Update Consultation management workflow #139
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connects to #120.
What does this PR do?
This PR slightly updates the Consultation management workflow by redirecting back to the edit action when performing an update request.
Digging a bit deeper, it also prepares the testing environment for Rails 5.0+ Controller testing, which is now based in
ActionDispatch::IntegrationTest
. To do so, we're adding a bunch of helper methods to let managing both Admin and User sessions. They are just available by inheriting your controller tests from theGobiertoControllerTest
class.How should this be manually tested?
This could be tested by submitting a Consultation update and checking that the request gets redirected to the same Consultation edit URL showing the proper flash message.
i.e.:
http:https://gobierto.dev/admin/budgets/consultations/<consultation_id>/edit
.