Simply put, in the end, i want to grab the query string from the url and add it to my cookie.
I know how to get the cookie set and am using Vanilla JS for it.
However I want to use Jasmine to test all the wrong cases and not just the happy path.
Anyways, How does one set the url in Jasmine, so that I can pass any query string (like http://www.blah.com?ref=yayayadaydayday
so that i can use it in my tests using document.location.search
and take it from there?
I'm guessing whatever it is called when you mock in Jasmine, but if this was rails, i'd add a query string like:
test "can get some results" do
get :show, :q => shops(:one).name #how do i add this 'q' string in jasmine?!
refute_nil assigns(:search)
end