summaryrefslogtreecommitdiff
path: root/spec/controllers/application_controller_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-03-20 22:55:08 +0100
committerDouwe Maan <douwe@selenight.nl>2016-03-20 22:55:08 +0100
commit7c51d5efecdad1a7f52ffecdf57c86b7b90ca166 (patch)
tree770615e2c9fe547f064a0de0246f397e32ff83c8 /spec/controllers/application_controller_spec.rb
parent3058a8fa4c1dfdf50a6f274bfbf280f8d2137168 (diff)
downloadgitlab-ce-7c51d5efecdad1a7f52ffecdf57c86b7b90ca166.tar.gz
Fix some specs
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-rw-r--r--spec/controllers/application_controller_spec.rb40
1 files changed, 0 insertions, 40 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb
index 55851befc8c..186239d3096 100644
--- a/spec/controllers/application_controller_spec.rb
+++ b/spec/controllers/application_controller_spec.rb
@@ -30,44 +30,4 @@ describe ApplicationController do
controller.send(:check_password_expiration)
end
end
-
- describe 'check labels authorization' do
- let(:project) { create(:project) }
- let(:user) { create(:user) }
- let(:controller) { ApplicationController.new }
-
- before do
- project.team << [user, :guest]
- allow(controller).to receive(:current_user).and_return(user)
- allow(controller).to receive(:project).and_return(project)
- end
-
- it 'should succeed if issues and MRs are enabled' do
- project.issues_enabled = true
- project.merge_requests_enabled = true
- controller.send(:authorize_read_label!)
- expect(response.status).to eq(200)
- end
-
- it 'should succeed if issues are enabled, MRs are disabled' do
- project.issues_enabled = true
- project.merge_requests_enabled = false
- controller.send(:authorize_read_label!)
- expect(response.status).to eq(200)
- end
-
- it 'should succeed if issues are disabled, MRs are enabled' do
- project.issues_enabled = false
- project.merge_requests_enabled = true
- controller.send(:authorize_read_label!)
- expect(response.status).to eq(200)
- end
-
- it 'should fail if issues and MRs are disabled' do
- project.issues_enabled = false
- project.merge_requests_enabled = false
- expect(controller).to receive(:access_denied!)
- controller.send(:authorize_read_label!)
- end
- end
end