Commit ea14bc31 authored by Jan Provaznik's avatar Jan Provaznik

[Rails5] Fix project import spec

When importing a project, after clicking 'Create Project' button, user is
redirected either to to the project's import page or project's show page
depending whether import is still in progress.

The difference in behavior is probably caused by `test_after_commit`
which is now included in Rails 5.
parent 071d60bb
......@@ -95,7 +95,13 @@ describe 'New project' do
click_button 'Create project'
created_project = Project.last
expect(current_path).to eq(project_path(created_project))
if Gitlab.rails5?
expect(current_path).to eq(project_import_path(created_project))
else
expect(current_path).to eq(project_path(created_project))
end
expect(created_project.project_feature).to be_issues_enabled
end
end
......@@ -113,7 +119,13 @@ describe 'New project' do
click_button 'Create project'
created_project = Project.last
expect(current_path).to eq(project_path(created_project))
if Gitlab.rails5?
expect(current_path).to eq(project_import_path(created_project))
else
expect(current_path).to eq(project_path(created_project))
end
expect(created_project.mirror).to eq(true)
expect(created_project.project_feature).not_to be_issues_enabled
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