Commit 4b1475b9 authored by Phil Hughes's avatar Phil Hughes

added helper spec

parent 0ad5fded
......@@ -242,4 +242,18 @@ describe BlobHelper do
end
end
end
describe '#ide_edit_path' do
let(:project) { create(:project) }
it 'returns full IDE path' do
expect(helper.ide_edit_path(project, "master", "")).to eq("/-/ide/project/#{project.namespace.path}/#{project.path}/edit/master/")
end
it 'returns IDE path without relative_url_root' do
Rails.application.routes.default_url_options[:script_name] = "/gitlab"
expect(helper.ide_edit_path(project, "master", "")).to eq("/gitlab/-/ide/project/#{project.namespace.path}/#{project.path}/edit/master/")
end
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