dimanche 26 juillet 2015

How to write test for visiting path that in browser corresponds with url+parameters

I'm using wice_grid gem for tables/grids. This gem offers sorting capability. For example, if I sort on username, this converts in the browser to: http://ift.tt/1MuWpDU.

Now, I would like to test for sorting in an integration test. But how can I initiate a sorting in an integration test?

I for example tried get users_path?grid[order]=fullname&grid[order_direction]=asc and also get users_path(grid[order]=fullname,grid[order_direction]=asc). But these don't seem to be the correct ways and generate errors.

Aucun commentaire:

Enregistrer un commentaire