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