Test downloading stuff

Guys,

Anybody know how to test the downloading stuff … ?

On 16 April 2010 08:10, Hemant B. [email protected] wrote:

Guys,

Anybody know how to test the downloading stuff … ?

What downloading stuff?

Colin

@hemant what kind of crap question is this? be clear on your question

On 16 April 2010 13:29, Colin L. [email protected] wrote:

You received this message because you are subscribed to the Google G.
“Ruby on Rails: Talk” group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected][email protected]
.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.


“Smile while you cry.”

“There are only two tragedies in life: one is not getting what one
wants,
and the other is getting it.”

I would suggest that you write the test first and then code. :slight_smile:

This test code would be in your functional tests which exercise
the controller.

You will need to do the get request for the file and then have
your assertions check that what you get back is what you expect,
a PDF file in this case.

More info here:

Have fun.

Balasubramaniam Muthaiah wrote:

@hemant what kind of crap question is this? be clear on your question

Hey what i mean was is that i have an link to pdf file… and when i
click on it in firefox, it prompts me to download the file…
(Development phase)

Now i want to write a test for it(Test phase) just to check that is that
downloading stuff is working fine or not… Got it…


“Smile while you cry.”

“There are only two tragedies in life: one is not getting what one
wants,
and the other is getting it.”

On 16 April 2010 09:26, Hemant B. [email protected] wrote:

Balasubramaniam Muthaiah wrote:

@hemant what kind of crap question is this? be clear on your question

Hey what i mean was is that i have an link to pdf file… and when i
click on it in firefox, it prompts me to download the file…
(Development phase)

Do you mean it is literally just a link to a pdf file? If so then
just check that the link is there on the page (using assert_select or
equivalent for whatever testing tools you are using). There is
nothing else to test.

Colin