Commit 781e0da9 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'blackst0ne-rails5-expected-search-search-seed_project-got-nil' into 'master'

Resolve "[Rails5] expected: "/search?search=seed_project" got: nil"

Closes #48013

See merge request gitlab-org/gitlab-ce!19936
parents 52f53c2e 79c3ec01
---
title: "[Rails5] Fix sessions_controller_spec"
merge_request: 19936
author: "@blackst0ne"
type: fixed
...@@ -257,15 +257,15 @@ describe SessionsController do ...@@ -257,15 +257,15 @@ describe SessionsController do
end end
end end
describe '#new' do describe "#new" do
before do before do
set_devise_mapping(context: @request) set_devise_mapping(context: @request)
end end
it 'redirects correctly for referer on same host with params' do it "redirects correctly for referer on same host with params" do
search_path = '/search?search=seed_project' host = "test.host"
allow(controller.request).to receive(:referer) search_path = "/search?search=seed_project"
.and_return('http://%{host}%{path}' % { host: 'test.host', path: search_path }) request.headers[:HTTP_REFERER] = "http://#{host}#{search_path}"
get(:new, redirect_to_referer: :yes) get(:new, redirect_to_referer: :yes)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment