Browse Source

number of times relet validation unit tests

pull/50/head
Matthew Phelan 3 years ago
parent
commit
6cfdb9a0b7
  1. 12
      spec/models/case_log_spec.rb

12
spec/models/case_log_spec.rb

@ -13,6 +13,18 @@ RSpec.describe Form, type: :model do
it "validates age is over 0" do it "validates age is over 0" do
expect { CaseLog.create!(tenant_age: 0) }.to raise_error(ActiveRecord::RecordInvalid) expect { CaseLog.create!(tenant_age: 0) }.to raise_error(ActiveRecord::RecordInvalid)
end end
it "validates number of relets is a number" do
expect { CaseLog.create!(property_number_of_times_relet: "random") }.to raise_error(ActiveRecord::RecordInvalid)
end
it "validates number of relets is under 20" do
expect { CaseLog.create!(property_number_of_times_relet: 21) }.to raise_error(ActiveRecord::RecordInvalid)
end
it "validates number of relets is over 0" do
expect { CaseLog.create!(property_number_of_times_relet: 0) }.to raise_error(ActiveRecord::RecordInvalid)
end
end end
describe "status" do describe "status" do

Loading…
Cancel
Save