summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2016-09-19 19:28:41 +0100
committerNick Thomas <nick@gitlab.com>2016-09-27 13:17:56 +0100
commit3ed80a0176a0c8155ff6f84a8f3e70718babd8ce (patch)
tree44024da6998dfaabd0de193cb510d8ea96f8fe21 /spec/controllers
parentfca610e5cbf5382f3814120227a0ca11440c8a9f (diff)
downloadgitlab-ce-3ed80a0176a0c8155ff6f84a8f3e70718babd8ce.tar.gz
Enforce the fork_project permission in Projects::CreateService
Projects::ForkService delegates to this service almost entirely, but needed one small change so it would propagate create errors correctly. CreateService#execute needs significant refactoring; it is now right at the complexity limit set by Rubocop. I avoided doing so in this commit to keep the diff as small as possible. Several tests depend on the insecure behaviour of ForkService, so fi them up at the same time.
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/users_controller_spec.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb
index 54a2d3d9460..19a8b1fe524 100644
--- a/spec/controllers/users_controller_spec.rb
+++ b/spec/controllers/users_controller_spec.rb
@@ -73,8 +73,8 @@ describe UsersController do
end
context 'forked project' do
- let!(:project) { create(:project) }
- let!(:forked_project) { Projects::ForkService.new(project, user).execute }
+ let(:project) { create(:project) }
+ let(:forked_project) { Projects::ForkService.new(project, user).execute }
before do
sign_in(user)