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 BCF specs to provide a default type
Wieland Lindenthal1d4ca2d02a09
diff --git a/modules/bcf/spec/bcf/bcf_xml/importer_spec.rb b/modules/bcf/spec/bcf/bcf_xml/importer_spec.rbindex 4fe0b4eb3ba..6a7d453d3ee 100644--- a/modules/bcf/spec/bcf/bcf_xml/importer_spec.rb+++ b/modules/bcf/spec/bcf/bcf_xml/importer_spec.rb@@ -27,7 +27,7 @@ describe ::OpenProject::Bcf::BcfXml::Importer do'application/octet-stream')end- let(:type) { FactoryBot.create :type, name: 'Issue' }+ let(:type) { FactoryBot.create :type, name: 'Issue', is_standard: true, is_default: true }let(:project) doFactoryBot.create(:project,identifier: 'bim_project',diff --git a/modules/bcf/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rb b/modules/bcf/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rbindex 7c46809e618..8ef22929133 100644--- a/modules/bcf/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rb+++ b/modules/bcf/spec/requests/api/bcf_xml/v1/bcf_xml_api_spec.rb@@ -32,13 +32,15 @@ require 'rack/test'describe 'BCF XML API v1 bcf_xml resource', type: :request doinclude Rack::Test::Methods+ let!(:status) { FactoryBot.create(:status, name: 'New', is_default: true) }+ let!(:type) { FactoryBot.create :type, name: 'Issue', is_standard: true, is_default: true }+ let!(:priority) { FactoryBot.create(:issue_priority, name: "Mega high", is_default: true) }+ let!(:project) { FactoryBot.create(:project, types: [type]) }+let(:current_user) doFactoryBot.create(:user, member_in_project: project, member_through_role: role, firstname: "BIMjamin")end- let(:status) { FactoryBot.create(:status, name: 'New', is_default: true) }- let(:priority) { FactoryBot.create(:issue_priority, name: "Mega high", is_default: true)}- let(:work_package) { FactoryBot.create(:work_package, status: status, priority: priority) }- let(:project) { work_package.project }+ let(:work_package) { FactoryBot.create(:work_package, status: status, priority: priority, project: project) }let(:bcf_issue) { FactoryBot.create(:bcf_issue_with_comment, work_package: work_package) }let(:role) { FactoryBot.create(:role, permissions: permissions) }let(:permissions) { %i(view_work_packages view_linked_issues) }@@ -126,6 +128,8 @@ describe 'BCF XML API v1 bcf_xml resource', type: :request doendbefore do+ work_package+expect(project.work_packages.count).to eql(1)post path, params, 'CONTENT_TYPE' => 'multipart/form-data'end