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
1717 assert last_response.ok?
1818 end
1919
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+
2026 it "redirects without the query string" do
2127 get '/', foo: 'bar'
2228 assert last_response.redirect?