OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Fix controller spec requiring admin
Oliver Günther72696429e8da
diff --git a/spec/controllers/custom_fields_controller_spec.rb b/spec/controllers/custom_fields_controller_spec.rbindex db97e208f2c..33fd0e71465 100644--- a/spec/controllers/custom_fields_controller_spec.rb+++ b/spec/controllers/custom_fields_controller_spec.rb@@ -29,12 +29,12 @@require 'spec_helper'describe CustomFieldsController, type: :controller do+ using_shared_fixtures :admin+let(:custom_field) { FactoryBot.build_stubbed(:custom_field) }before do- allow(@controller).to receive(:authorize)- allow(@controller).to receive(:check_if_login_required)- allow(@controller).to receive(:require_admin)+ login_as adminenddescribe 'POST edit' do@@ -99,8 +99,8 @@ describe CustomFieldsController, type: :controller doendit 'responds ok' do- expect(response.status).to eq(302)- expect(assigns(:custom_field).name).to eq('field')+ expect(response).to be_redirect+ expect(CustomField.last.name).to eq 'field'endendend