diff --git a/spec/models/journable/with_historic_attributes_spec.rb b/spec/models/journable/with_historic_attributes_spec.rb index d5fd106b9b9c..24f6287831a7 100644 --- a/spec/models/journable/with_historic_attributes_spec.rb +++ b/spec/models/journable/with_historic_attributes_spec.rb @@ -149,7 +149,7 @@ end context "with active record relation of work packages" do - let(:work_packages) { WorkPackage.all } + let(:work_packages) { WorkPackage.order(subject: :asc).all } it "provides access to the work-package attributes" do expect(subject.map(&:subject)).to eq ["The current work package 1", "The current work package 2"] @@ -246,7 +246,7 @@ end context "with active record relation of work packages" do - let(:work_packages) { WorkPackage.all } + let(:work_packages) { WorkPackage.order(subject: :asc).all } it "provides access to the work-package attributes at timestamps" do expect(subject.first.attributes_by_timestamp["2022-01-01T00:00:00Z"].subject).to eq "The original work package 1"