History

Fix keyword search in Firefox and URL search via query param

Fixes #577.

Thibaut Courouble committed 9 years ago

Commit ad044f81 parent 476c69e3 files · +8 −1Browse files

Showing the changes to test (1 of 3 files). Show all

Unified · Split

test/app_test.rb+6−0
@@ -17,6 +17,12 @@ class AppTest < MiniTest::Spec · 16 unmodified lines
17 assert last_response.ok?17 assert last_response.ok?
18 end18 end
19 19
20 it "redirects to /#q= when there is a 'q' query param" do
21 get '/search', q: 'foo'
22 assert last_response.redirect?
23 assert_equal 'http://example.org/#q=foo', last_response['Location']
24 end
25
20 it "redirects without the query string" do26 it "redirects without the query string" do
21 get '/', foo: 'bar'27 get '/', foo: 'bar'
22 assert last_response.redirect?28 assert last_response.redirect?