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
Timestamp: make sure an `ArgumentError` is raised when `Timestamp.parse("Pfoo")`
Sebastian Fiedlschuster0ef6fbb11374
diff --git a/spec/models/timestamp_spec.rb b/spec/models/timestamp_spec.rbindex b2ed5870899..2a2fd056f05 100644--- a/spec/models/timestamp_spec.rb+++ b/spec/models/timestamp_spec.rb@@ -116,6 +116,15 @@ describe Timestamp doit "raises an error" doexpect { subject }.to raise_error ArgumentErrorend++ describe "when providing something invalid starting with P (for duration)" do+ subject { described_class.parse("Pfoo") }++ it "raises an error" do+ expect { subject }.to raise_error ArgumentError+ expect { subject }.to raise_error ActiveSupport::Duration::ISO8601Parser::ParsingError+ end+ endendend