I wanted to test rjs redirection:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assert_select_rjs :redirect_to, '/' |
Problem:
ActionController::Assertions::SelectorAssertions#assert_select_rjs
don't know about :redirect_to
Solution:
I don't know if this is the right solution but I added this at the end of my
test_helper.rb
then I can assert by :redirect_to
now
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ActionController::Assertions::SelectorAssertions | |
RJS_STATEMENTS[:redirect_to] = "window\\.location\\.href = #{RJS_ANY_ID}" | |
end |
2 comments:
This was just the trick for a search I was writing today! FYI, I noticed a patch ticket for this in the rails lighthouse, so I expect it to be in an official release soon. Cheers.
PLEASE READ PLEASE READ PLEASE READ
Hello everyone, i would like to share my experience on this platform. i have been hearing of Blank Atm for a while and i applied through a few people but i was scammed, not until i found Mr George who saved me from scammers, i got my blank ATM card in 5 days after application and tried the encrypted card in an ATM machine and pos cash store to my greatest surprise i was able to withdraw $3000 and that was the daily rate i applied for. to be honest there is no risk involved the card is not traceable and has an infrared signal that blocks off CCTV during your withdrawals. i just payed my daughters tuition fee and cleared my mortgage debts, i am also richer and started a business that is doing fine. Mr George is really a life saver and he is very genuine. You can contact him with this email address: blankatm402@gmail.com
Best wishes
Post a Comment