Browse Source

Push form definition and tasklist helper spec fixes

pull/264/head
Stéphane Meny 3 years ago
parent
commit
9122afd107
No known key found for this signature in database
GPG Key ID: 9D0AFEA988527923
  1. 4
      spec/helpers/tasklist_helper_spec.rb
  2. 6
      spec/lib/tasks/form_definition_validator_spec.rb

4
spec/helpers/tasklist_helper_spec.rb

@ -57,13 +57,13 @@ RSpec.describe TasklistHelper do
describe "subsection link" do
let(:subsection) { case_log.form.get_subsection("household_characteristics") }
context "for a subsection that's enabled" do
context "with a subsection that's enabled" do
it "returns the subsection link url" do
expect(subsection_link(subsection, case_log)).to match(/household-characteristics/)
end
end
context "for a subsection that cannot be started yet" do
context "with a subsection that cannot be started yet" do
before do
allow(subsection).to receive(:status).with(case_log).and_return(:cannot_start_yet)
end

6
spec/lib/tasks/form_definition_validator_spec.rb

@ -1,7 +1,8 @@
require "rails_helper"
require "rake"
describe "rake form_definition:validate_all", type: :task do
RSpec.describe "form_definition" do
describe ":validate_all", type: :task do
subject(:task) { Rake::Task["form_definition:validate_all"] }
before do
@ -16,7 +17,7 @@ describe "rake form_definition:validate_all", type: :task do
end
end
describe "rake form_definition:validate", type: :task do
describe ":validate", type: :task do
subject(:task) { Rake::Task["form_definition:validate"] }
before do
@ -31,3 +32,4 @@ describe "rake form_definition:validate", type: :task do
task.invoke("config/forms/2021_2022.json")
end
end
end

Loading…
Cancel
Save