Fix typos in processes dates validation specs

This commit is contained in:
Javi Martín
2021-05-20 11:26:41 +02:00
parent 9466aed833
commit 89545db3c0

View File

@@ -30,14 +30,14 @@ describe Legislation::Process do
expect(process.errors.messages[:debate_start_date]).to include("can't be blank")
end
it "is invalid if allegations_start_date is present but debate_end_date is not" do
it "is invalid if allegations_start_date is present but allegations_end_date is not" do
process = build(:legislation_process, allegations_start_date: Date.current,
allegations_end_date: "")
expect(process).to be_invalid
expect(process.errors.messages[:allegations_end_date]).to include("can't be blank")
end
it "is invalid if debate_end_date is present but allegations_start_date is not" do
it "is invalid if allegations_end_date is present but allegations_start_date is not" do
process = build(:legislation_process, allegations_start_date: nil,
allegations_end_date: Date.current)
expect(process).to be_invalid