Skip to content

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

baseline api: adding missing specs for `Journable::WithHistoricAttributes`

Sebastian Fiedlschuster4ea8fe4d7dbb
diff --git a/spec/models/journable/with_historic_attributes_spec.rb b/spec/models/journable/with_historic_attributes_spec.rb
index 50b8dc15a45..a7815493a6d 100644
--- a/spec/models/journable/with_historic_attributes_spec.rb
+++ b/spec/models/journable/with_historic_attributes_spec.rb
@@ -507,6 +507,14 @@ describe Journable::WithHistoricAttributes do
expect(subject).to be false
end
end
+
+ describe "without a query" do
+ let(:query) { nil }
+
+ it "does not determine whether the journable matches the query at the baseline timestamp" do
+ expect(subject).to be_nil
+ end
+ end
end
describe "#current_timestamp" do
@@ -548,5 +556,13 @@ describe Journable::WithHistoricAttributes do
expect(subject).to be true
end
end
+
+ describe "without a query" do
+ let(:query) { nil }
+
+ it "does not determine whether the journable matches the query at the current timestamp" do
+ expect(subject).to be_nil
+ end
+ end
end
end