Overview :
in my views i have a button(test) with action image.csv , when i am clicking( find_button('test').click) on that , it sending to controller image
Problem :
It's not passing whole action to the server . so format option always getting html , not csv , in the test cases
please suggest me for the same
--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/3659fc68-3d51-40f6-b12a-01975ff6624c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To Reproduce Issue :
Views Code
= f.submit 'test', 'data-action' => 'images.csv'
= link_to "test1", images_path(format: "csv")
Rspec code :
Case 1:
scenario 'Should get valid CSV files' do
click_button('test')
end
Case 2:
scenario 'Should get valid CSV files' do
click_link('test1')
end
check the log files , in case 1 request Url is images
in case 2 request Url is images.csv
= f.submit 'test', 'data-action' => 'images.csv'
= link_to "test1", images_path(format: "csv")
--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/eb6538af-3ada-4385-a9b8-4eda23889ae6%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rspec+un...@googlegroups.com.
To post to this group, send email to rs...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rspec/63732d1f-4c17-4532-ad3b-8d1512bcba52%40googlegroups.com.