Commit f45740e0 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Fixed rspec and spinach tests

parent 389fb420
......@@ -4,7 +4,6 @@ class Admin::PushRulesController < Admin::ApplicationController
respond_to :html
def show
redirect_to namespace_project_settings_repository_path(@project.namespace, @project)
end
def update
......
......@@ -21,11 +21,11 @@ class Projects::MirrorsController < Projects::ApplicationController
else
flash[:notice] = "Mirroring settings were successfully updated."
end
redirect_to namespace_project_mirror_path(@project.namespace, @project)
else
render :show
flash[:alert] = @project.errors.full_messages.join(',').html_safe
end
redirect_to namespace_project_settings_repository_path(@project.namespace, @project)
end
def update_now
......@@ -36,8 +36,7 @@ class Projects::MirrorsController < Projects::ApplicationController
@project.update_mirror
flash[:notice] = "The repository is being updated..."
end
redirect_back_or_default(default: namespace_project_path(@project.namespace, @project))
redirect_to namespace_project_settings_repository_path(@project.namespace, @project)
end
private
......
......@@ -284,7 +284,7 @@ module SharedPaths
end
step 'I visit project push rules page' do
visit namespace_project_push_rules_path(@project.namespace, @project)
visit namespace_project_settings_repository_path(@project.namespace, @project)
end
step 'I visit project deploy keys page' do
......
......@@ -24,9 +24,9 @@ describe Projects::MirrorsController do
mirror_trigger_builds: '0'
}
expect(response).to have_http_status :success
expect(response).to render_template(:show)
expect(response.body).to include('Import url can&#39;t be blank')
expect(response).to have_http_status(302)
expect(response).to redirect_to(namespace_project_settings_repository_path(project.namespace, project))
expect(flash[:alert]).to include("Import url can't be blank")
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