Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 23:40:35 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 23:40:35 +0300
commite21deaee8ee0d453bf899c1b3fb46262cc60dab9 (patch)
tree59b04c9cb1c8ce6c510a78ee787fb31817619835 /spec/controllers
parent7e2dbcbe0915cfd75e91d78e943c153f284df37d (diff)
parent0ad669bb5ba08d012d3daa50b51a3a6b069e3e83 (diff)
Merge remote-tracking branch 'origin/master' into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g
# Conflicts: # Gemfile.lock
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/namespaces_controller_spec.rb10
-rw-r--r--spec/controllers/root_controller_spec.rb8
-rw-r--r--spec/controllers/uploads_controller_spec.rb8
3 files changed, 8 insertions, 18 deletions
diff --git a/spec/controllers/namespaces_controller_spec.rb b/spec/controllers/namespaces_controller_spec.rb
index 9c8619722cd..77436958711 100644
--- a/spec/controllers/namespaces_controller_spec.rb
+++ b/spec/controllers/namespaces_controller_spec.rb
@@ -46,13 +46,11 @@ describe NamespacesController do
context "when the project doesn't have public projects" do
context "when not signed in" do
- it "redirects to the sign in page" do
+ it "does not redirect to the sign in page" do
get :show, id: group.path
-
- expect(response).to redirect_to(new_user_session_path)
+ expect(response).not_to redirect_to(new_user_session_path)
end
end
-
context "when signed in" do
before do
sign_in(user)
@@ -86,10 +84,10 @@ describe NamespacesController do
end
context "when the user doesn't have access to the project" do
- it "responds with status 404" do
+ it "redirects to the group's page" do
get :show, id: group.path
- expect(response.status).to eq(404)
+ expect(response).to redirect_to(group_path(group))
end
end
end
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/controllers/uploads_controller_spec.rb b/spec/controllers/uploads_controller_spec.rb
index 0f9780356b1..af5d043cf02 100644
--- a/spec/controllers/uploads_controller_spec.rb
+++ b/spec/controllers/uploads_controller_spec.rb
@@ -156,14 +156,6 @@ describe UploadsController do
end
context "when the project doesn't have public projects" do
- context "when not signed in" do
- it "redirects to the sign in page" do
- get :show, model: "group", mounted_as: "avatar", id: group.id, filename: "image.png"
-
- expect(response).to redirect_to(new_user_session_path)
- end
- end
-
context "when signed in" do
before do
sign_in(user)