Commit 04aac095 authored by Catalin Irimie's avatar Catalin Irimie Committed by Imre Farkas

Remove the duplicate hidden namespace_id field on the import page

parent f6091b84
......@@ -14,7 +14,6 @@
= _("To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here.")
.row
.form-group.col-sm-12
= hidden_field_tag :namespace_id, @namespace.id
= label_tag :file, _('GitLab project export'), class: 'label-bold'
.form-group
= file_field_tag :file, class: ''
......
---
title: Fixed project import from export ignoring namespace selection
merge_request: 20405
author:
type: fixed
# frozen_string_literal: true
require 'spec_helper'
describe 'import/gitlab_projects/new.html.haml' do
include Devise::Test::ControllerHelpers
let(:user) { build_stubbed(:user, namespace: build_stubbed(:namespace)) }
before do
allow(view).to receive(:current_user).and_return(user)
end
context 'when the user has no other namespaces' do
it 'shows a namespace_id hidden field tag' do
render
expect(rendered).to have_css('input[name="namespace_id"]', count: 1, visible: false)
end
end
context 'when the user can select other namespaces' do
it 'shows a namespace_id select' do
allow(user).to receive(:can_select_namespace?).and_return(true)
render
expect(rendered).to have_select('namespace_id', count: 1)
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