summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-09-08 15:14:14 +0100
committerDouwe Maan <douwe@gitlab.com>2015-09-08 15:14:14 +0100
commit1489d225d6763b0fdc3f418692e646587e06938a (patch)
treeebc241ea14adb58c8443c0b4aac28cda43cecb2b
parent5d785457db3017a17722314a52433543dd925164 (diff)
downloadgitlab-ce-1489d225d6763b0fdc3f418692e646587e06938a.tar.gz
Move partial to right place and fix tests.
-rw-r--r--app/controllers/groups_controller.rb2
-rw-r--r--app/controllers/projects_controller.rb2
-rw-r--r--app/controllers/snippets_controller.rb2
-rw-r--r--app/views/dashboard/projects/_zero_authorized_projects.html.haml (renamed from app/views/dashboard/_zero_authorized_projects.html.haml)0
-rw-r--r--spec/controllers/root_controller_spec.rb8
-rw-r--r--spec/routing/routing_spec.rb6
6 files changed, 10 insertions, 10 deletions
diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb
index 85bf44ee9a5..486c6b2819c 100644
--- a/app/controllers/groups_controller.rb
+++ b/app/controllers/groups_controller.rb
@@ -15,7 +15,7 @@ class GroupsController < Groups::ApplicationController
layout :determine_layout
def index
- redirect_to (current_user ? dashboard_groups_path : explore_groups_path)
+ redirect_to(current_user ? dashboard_groups_path : explore_groups_path)
end
def new
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 540bfa9ac07..0bbaa93b0df 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -11,7 +11,7 @@ class ProjectsController < ApplicationController
layout :determine_layout
def index
- redirect_to (current_user ? root_path : explore_root_path)
+ redirect_to(current_user ? root_path : explore_root_path)
end
def new
diff --git a/app/controllers/snippets_controller.rb b/app/controllers/snippets_controller.rb
index f5938da936f..9f9f9a92f11 100644
--- a/app/controllers/snippets_controller.rb
+++ b/app/controllers/snippets_controller.rb
@@ -26,7 +26,7 @@ class SnippetsController < ApplicationController
render 'index'
else
- redirect_to (current_user ? dashboard_snippets_path : explore_snippets_path)
+ redirect_to(current_user ? dashboard_snippets_path : explore_snippets_path)
end
end
diff --git a/app/views/dashboard/_zero_authorized_projects.html.haml b/app/views/dashboard/projects/_zero_authorized_projects.html.haml
index 4e7d6639727..4e7d6639727 100644
--- a/app/views/dashboard/_zero_authorized_projects.html.haml
+++ b/app/views/dashboard/projects/_zero_authorized_projects.html.haml
diff --git a/spec/controllers/root_controller_spec.rb b/spec/controllers/root_controller_spec.rb
index abbbf6855fc..64dfe8f34e3 100644
--- a/spec/controllers/root_controller_spec.rb
+++ b/spec/controllers/root_controller_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'
describe RootController do
- describe 'GET show' do
+ describe 'GET index' do
context 'with a user' do
let(:user) { create(:user) }
@@ -16,15 +16,15 @@ describe RootController do
end
it 'redirects to their specified dashboard' do
- get :show
+ get :index
expect(response).to redirect_to starred_dashboard_projects_path
end
end
context 'who uses the default dashboard setting' do
it 'renders the default dashboard' do
- get :show
- expect(response).to render_template 'dashboard/show'
+ get :index
+ expect(response).to render_template 'dashboard/projects/index'
end
end
end
diff --git a/spec/routing/routing_spec.rb b/spec/routing/routing_spec.rb
index dd045826692..dfa18f69e05 100644
--- a/spec/routing/routing_spec.rb
+++ b/spec/routing/routing_spec.rb
@@ -206,7 +206,7 @@ end
# dashboard_merge_requests GET /dashboard/merge_requests(.:format) dashboard#merge_requests
describe DashboardController, "routing" do
it "to #index" do
- expect(get("/dashboard")).to route_to('dashboard#show')
+ expect(get("/dashboard")).to route_to('dashboard/projects#index')
end
it "to #issues" do
@@ -220,8 +220,8 @@ end
# root / root#show
describe RootController, 'routing' do
- it 'to #show' do
- expect(get('/')).to route_to('root#show')
+ it 'to #index' do
+ expect(get('/')).to route_to('root#index')
end
end