Looking at your code I’d suggest you check that `data-action` is actually being 
set on your page and not lost into Rails, I’m not sure Rails would recognise it 
passed in like that, you might have to add `html_options: { 'data-action' => 
'images.csv’ }` additionally even if it is being passed in correctly theres 
still the possibility your JS is erroring.

Jon Rowe
---------------------------
[email protected]
jonrowe.co.uk


On Wednesday, 17 December 2014 at 08:44, Jon Rowe wrote:

> For the benefit of the people on the list part of the view code:
>  
>  
> = f.submit 'test', 'data-action' => 'images.csv'
> = link_to "test1", images_path(format: "csv")
>  
>  
> Spec files:
>  
> scenario 'Should get valid CSV files' do
>   click_button('test')
> end
>  
> scenario 'Should get valid CSV files' do
>   click_link('test1')
> end  
>  
> Jon Rowe
> ---------------------------
> [email protected] (mailto:[email protected])
> jonrowe.co.uk (http://jonrowe.co.uk)
>  
>  
> On Wednesday, 17 December 2014 at 08:39, John wrote:
>  
> > @jonrowe  
> >  
> > i am using poltergeist driver  
> >  
> > On Tuesday, 16 December 2014 22:23:31 UTC+1, John wrote:
> > >  
> > > 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 [email protected] 
> > (mailto:[email protected]).
> > To post to this group, send email to [email protected] 
> > (mailto:[email protected]).
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msgid/rspec/eb6538af-3ada-4385-a9b8-4eda23889ae6%40googlegroups.com
> >  
> > (https://groups.google.com/d/msgid/rspec/eb6538af-3ada-4385-a9b8-4eda23889ae6%40googlegroups.com?utm_medium=email&utm_source=footer).
> > For more options, visit https://groups.google.com/d/optout.
>  

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/A43AA8B89BD34E158D3F09A33DF6F3D5%40jonrowe.co.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to