diff options
author | Rémy Coutable <remy@rymai.me> | 2016-02-17 15:05:44 +0100 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-17 15:05:44 +0100 |
commit | 3d3ac87af991319d6960a963c0975c83bf7e4108 (patch) | |
tree | 5cc0985e4c20a55caf42e9199293188fc0b67a66 /spec/controllers/projects/imports_controller_spec.rb | |
parent | 943bed68bc42d02246ddea63a25432d3aba709e7 (diff) | |
download | gitlab-ce-3d3ac87af991319d6960a963c0975c83bf7e4108.tar.gz |
Redirect /import to project page if no importing at all and repo existsfix/13367-redirect-to-project-page-if-no-import
Fixes #13367.
Diffstat (limited to 'spec/controllers/projects/imports_controller_spec.rb')
-rw-r--r-- | spec/controllers/projects/imports_controller_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/controllers/projects/imports_controller_spec.rb b/spec/controllers/projects/imports_controller_spec.rb index 85d1d1e0524..0147bd2b953 100644 --- a/spec/controllers/projects/imports_controller_spec.rb +++ b/spec/controllers/projects/imports_controller_spec.rb @@ -104,6 +104,18 @@ describe Projects::ImportsController do end end end + + context 'when import never happened' do + before do + project.update_attribute(:import_status, :none) + end + + it 'redirects to namespace_project_path' do + get :show, namespace_id: project.namespace.to_param, project_id: project.to_param + + expect(response).to redirect_to namespace_project_path(project.namespace, project) + end + end end end end |