Fixes #577.
Showing the changes to test (1 of 3 files). Show all
Unified · Split
| @@ -17,6 +17,12 @@ class AppTest < MiniTest::Spec · 16 unmodified lines | ||
| 17 | 17 | assert last_response.ok? |
| 18 | 18 | 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 | 26 | it "redirects without the query string" do |
| 21 | 27 | get '/', foo: 'bar' |
| 22 | 28 | assert last_response.redirect? |