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
Modify specs
Oliver Günther0672230b67e1
diff --git a/modules/meeting/spec/contracts/meeting_sections/create_contract_spec.rb b/modules/meeting/spec/contracts/meeting_sections/create_contract_spec.rbindex 5ac3b116c9d..52a37f38208 100644--- a/modules/meeting/spec/contracts/meeting_sections/create_contract_spec.rb+++ b/modules/meeting/spec/contracts/meeting_sections/create_contract_spec.rb@@ -61,6 +61,14 @@ RSpec.describe MeetingSections::CreateContract doit_behaves_like "contract is invalid", base: :error_unauthorizedend++ context "when :title is empty" do+ before do+ section.title = ""+ end++ it_behaves_like "contract is invalid", title: :blank+ endendcontext "without permission" dodiff --git a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rbindex 71b194955a8..2710025cf58 100644--- a/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb+++ b/modules/meeting/spec/features/structured_meetings/structured_meeting_crud_spec.rb@@ -394,7 +394,7 @@ RSpec.describe "Structured meetings CRUD",show_page.expect_agenda_item_in_section title: "First item", section: second_section- first_section = MeetingSection.find_by!(title: "Untitled")+ first_section = MeetingSection.find_by!(title: "")# add an item to the first section explicitlyshow_page.add_agenda_item_to_section(section: first_section) dodiff --git a/modules/meeting/spec/models/meeting_section_spec.rb b/modules/meeting/spec/models/meeting_section_spec.rbindex 3dd9ea35d41..fe796a05e8f 100644--- a/modules/meeting/spec/models/meeting_section_spec.rb+++ b/modules/meeting/spec/models/meeting_section_spec.rb@@ -39,21 +39,11 @@ RSpec.describe MeetingSection dodescribe "#title" dolet(:attributes) { { title: } }- context "when title is missing" do- let(:title) { nil }-- it "sets a default title" do- expect(subject).to be_valid- expect(subject.title).to eq I18n.t("meeting_section.default_title")- end- end-context "when title is blank" dolet(:title) { "" }- it "sets a default title" do+ it "is allowed" doexpect(subject).to be_valid- expect(subject.title).to eq I18n.t("meeting_section.default_title")endend