diff options
author | Robert Speicher <rspeicher@gmail.com> | 2017-07-06 12:20:50 -0400 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2017-07-06 12:20:50 -0400 |
commit | 9eeba8fb49c5da7cf0b2c22bc33cbd33a83918ed (patch) | |
tree | 74edd22b27623fc2bd0537be534355a4ce0fdc73 /spec/features/projects/project_settings_spec.rb | |
parent | ea2a91a36ef94e7e360056b0569377c6fe51491b (diff) | |
download | gitlab-ce-9eeba8fb49c5da7cf0b2c22bc33cbd33a83918ed.tar.gz |
Auto-correct ProjectPathHelper violations
Diffstat (limited to 'spec/features/projects/project_settings_spec.rb')
-rw-r--r-- | spec/features/projects/project_settings_spec.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/features/projects/project_settings_spec.rb b/spec/features/projects/project_settings_spec.rb index 2710a4cf271..89d227eb98f 100644 --- a/spec/features/projects/project_settings_spec.rb +++ b/spec/features/projects/project_settings_spec.rb @@ -12,7 +12,7 @@ describe 'Edit Project Settings', feature: true do describe 'Project settings section', js: true do it 'shows errors for invalid project name' do - visit edit_namespace_project_path(project.namespace, project) + visit edit_project_path(project) fill_in 'project_name_edit', with: 'foo&bar' click_button 'Save changes' expect(page).to have_field 'project_name_edit', with: 'foo&bar' @@ -21,7 +21,7 @@ describe 'Edit Project Settings', feature: true do end it 'shows a successful notice when the project is updated' do - visit edit_namespace_project_path(project.namespace, project) + visit edit_project_path(project) fill_in 'project_name_edit', with: 'hello world' click_button 'Save changes' expect(page).to have_content "Project 'hello world' was successfully updated." @@ -75,7 +75,7 @@ describe 'Edit Project Settings', feature: true do end specify 'the project is accessible via a redirect from the old path' do - old_path = namespace_project_path(project.namespace, project) + old_path = project_path(project) rename_project(project, path: 'bar') new_path = namespace_project_path(project.namespace, 'bar') visit old_path @@ -85,7 +85,7 @@ describe 'Edit Project Settings', feature: true do context 'and a new project is added with the same path' do it 'overrides the redirect' do - old_path = namespace_project_path(project.namespace, project) + old_path = project_path(project) rename_project(project, path: 'bar') new_project = create(:empty_project, namespace: user.namespace, path: 'gitlabhq', name: 'quz') visit old_path @@ -122,7 +122,7 @@ describe 'Edit Project Settings', feature: true do end specify 'the project is accessible via a redirect from the old path' do - old_path = namespace_project_path(project.namespace, project) + old_path = project_path(project) transfer_project(project, group) new_path = namespace_project_path(group, project) visit old_path @@ -132,7 +132,7 @@ describe 'Edit Project Settings', feature: true do context 'and a new project is added with the same path' do it 'overrides the redirect' do - old_path = namespace_project_path(project.namespace, project) + old_path = project_path(project) transfer_project(project, group) new_project = create(:empty_project, namespace: user.namespace, path: 'gitlabhq', name: 'quz') visit old_path @@ -144,7 +144,7 @@ describe 'Edit Project Settings', feature: true do end def rename_project(project, name: nil, path: nil) - visit edit_namespace_project_path(project.namespace, project) + visit edit_project_path(project) fill_in('project_name', with: name) if name fill_in('Path', with: path) if path click_button('Rename project') @@ -153,7 +153,7 @@ def rename_project(project, name: nil, path: nil) end def transfer_project(project, namespace) - visit edit_namespace_project_path(project.namespace, project) + visit edit_project_path(project) select2(namespace.id, from: '#new_namespace_id') click_button('Transfer project') confirm_transfer_modal |