|
|
@@ -17,6 +17,12 @@ class AppTest < MiniTest::Spec
|
|
|
assert last_response.ok?
|
|
|
end
|
|
|
|
|
|
+ it "redirects to /#q= when there is a 'q' query param" do
|
|
|
+ get '/search', q: 'foo'
|
|
|
+ assert last_response.redirect?
|
|
|
+ assert_equal 'http://example.org/#q=foo', last_response['Location']
|
|
|
+ end
|
|
|
+
|
|
|
it "redirects without the query string" do
|
|
|
get '/', foo: 'bar'
|
|
|
assert last_response.redirect?
|