Commit 1d9540cc authored by Phil Hughes's avatar Phil Hughes

restore original script_name config

parent 4b1475b9
...@@ -246,7 +246,18 @@ describe BlobHelper do ...@@ -246,7 +246,18 @@ describe BlobHelper do
describe '#ide_edit_path' do describe '#ide_edit_path' do
let(:project) { create(:project) } let(:project) { create(:project) }
around(:each) do |example|
old_script_name = Rails.application.routes.default_url_options[:script_name]
begin
example.run
ensure
Rails.application.routes.default_url_options[:script_name] = old_script_name
end
end
it 'returns full IDE path' do it 'returns full IDE path' do
Rails.application.routes.default_url_options[:script_name] = nil
expect(helper.ide_edit_path(project, "master", "")).to eq("/-/ide/project/#{project.namespace.path}/#{project.path}/edit/master/") expect(helper.ide_edit_path(project, "master", "")).to eq("/-/ide/project/#{project.namespace.path}/#{project.path}/edit/master/")
end end
......
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