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 | assert last_response.ok? | 17 | assert last_response.ok? |
| 18 | end | 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 | it "redirects without the query string" do | 26 | 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? |