Browse Source

fixup! CLDC-NONE: Add a test to ensure future logs are completed

fix assertion order

improve test labels
pull/3159/head
Samuel Young 2 weeks ago
parent
commit
862f9cb487
  1. 8
      spec/shared/shared_log_examples.rb

8
spec/shared/shared_log_examples.rb

@ -8,14 +8,14 @@ RSpec.shared_examples "shared log examples" do |log_type|
[ [
{ {
start_date: :current_collection_start_date, start_date: :current_collection_start_date,
label: "current year", label: "current",
}, },
{ {
start_date: :next_collection_start_date, start_date: :next_collection_start_date,
label: "next year", label: "next",
}, },
].each do |scenario| ].each do |scenario|
context "when creating a log for #{scenario[:label]}" do context "when creating a log for #{scenario[:label]} year" do
around do |example| around do |example|
start_date = Timecop.return { send(scenario[:start_date]) } start_date = Timecop.return { send(scenario[:start_date]) }
@ -30,8 +30,8 @@ RSpec.shared_examples "shared log examples" do |log_type|
let(:completed_log) { create(log_type, :completed) } let(:completed_log) { create(log_type, :completed) }
it "is set to not started for an empty #{log_type} log" do it "is set to not started for an empty #{log_type} log" do
expect(empty_log.not_started?).to be(true)
expect(empty_log.in_progress?).to be(false) expect(empty_log.in_progress?).to be(false)
expect(empty_log.not_started?).to be(true)
expect(empty_log.completed?).to be(false) expect(empty_log.completed?).to be(false)
expect(empty_log.deleted?).to be(false) expect(empty_log.deleted?).to be(false)
end end

Loading…
Cancel
Save