summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJose Ivan Vargas <jvargas@gitlab.com>2017-02-28 11:49:32 -0600
committerJose Ivan Vargas <jvargas@gitlab.com>2017-03-06 09:47:44 -0600
commit43958926c5310642f2fc0c6f72952004d2ca5089 (patch)
treee22837cc90314fc245058a9c764796d48dd1df11 /spec
parenta29517dd0c6515121a2f42e08ad011415a3d8618 (diff)
downloadgitlab-ce-43958926c5310642f2fc0c6f72952004d2ca5089.tar.gz
Added delegations to comply with the new rubocop rules
Also fixed the deploy_keys view and moved the code from the repository_helper to the repository_controller
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects/settings/repository_controller_spec.rb4
-rw-r--r--spec/helpers/repository_helper_spec.rb22
2 files changed, 2 insertions, 24 deletions
diff --git a/spec/controllers/projects/settings/repository_controller_spec.rb b/spec/controllers/projects/settings/repository_controller_spec.rb
index 65f7bb34f4a..77faf96033d 100644
--- a/spec/controllers/projects/settings/repository_controller_spec.rb
+++ b/spec/controllers/projects/settings/repository_controller_spec.rb
@@ -1,11 +1,11 @@
require 'spec_helper'
-describe Projects::Settings::IntegrationsController do
+describe Projects::Settings::RepositoryController do
let(:project) { create(:empty_project, :public) }
let(:user) { create(:user) }
before do
- project.team << [user, :master]
+ project.add_master(user)
sign_in(user)
end
diff --git a/spec/helpers/repository_helper_spec.rb b/spec/helpers/repository_helper_spec.rb
deleted file mode 100644
index f2a68cb2eae..00000000000
--- a/spec/helpers/repository_helper_spec.rb
+++ /dev/null
@@ -1,22 +0,0 @@
-require 'spec_helper'
-
-describe RepositoryHelper do
- let(:user) { create(:user, :admin) }
- let(:project) { create(:project, :repository) }
-
- before do
- project.protected_branches.create(name: 'master')
- end
-
- describe 'Access Level Options' do
- it 'has three push access levels' do
- push_access_levels = helper.access_levels_options[:push_access_levels]["Roles"]
- expect(push_access_levels.size).to eq(3)
- end
-
- it 'has one merge access level' do
- merge_access_levels = helper.access_levels_options[:merge_access_levels]["Roles"]
- expect(merge_access_levels.size).to eq(2)
- end
- end
-end