Testing that Rails verify_authenticity_token is being skipped -
i have action in rails 3.2 application skips verification of authenticity token, follows:
skip_before_filter :verify_authenticity_token, only: [:my_action_name]
however, time time, gets removed accidentally developers, , app fails silently, losing user's session on particular (ajax) action.
from within functional tests, simplest way test before filter being skipped action? i.e. simplest way test line has not been removed?
i run:
before_filter :verify_authenticity_token, only: [:add, :your, :actions, :here]
and add actions want run verify_authenticity_token on
Comments
Post a Comment