Use `empty_project` where possible in spec/features/profiles

This commit is contained in:
Robert Speicher 2017-07-21 17:19:12 -04:00
parent 0853dacad6
commit f7c5c68610
1 changed files with 3 additions and 3 deletions

View File

@ -27,7 +27,7 @@ feature 'Profile > Account' do
end
context 'with a project' do
given!(:project) { create(:project, namespace: user.namespace, path: 'project') }
given!(:project) { create(:empty_project, namespace: user.namespace) }
given(:new_project_path) { "/#{new_username}/#{project.path}" }
given(:old_project_path) { "/#{user.username}/#{project.path}" }
@ -43,14 +43,14 @@ feature 'Profile > Account' do
update_username(new_username)
visit new_project_path
expect(current_path).to eq(new_project_path)
expect(find('h1.project-title')).to have_content(project.name)
expect(find('h1.title')).to have_content(project.path)
end
scenario 'the old project path redirects to the new path' do
update_username(new_username)
visit old_project_path
expect(current_path).to eq(new_project_path)
expect(find('h1.project-title')).to have_content(project.name)
expect(find('h1.title')).to have_content(project.path)
end
end
end