From 8df5ed0e02b4457e803992efe0303193a68dcb14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juanjo=20Baz=C3=A1n?= Date: Sat, 12 Sep 2015 12:55:08 +0200 Subject: [PATCH] adds test for question presence --- spec/models/proposal_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/models/proposal_spec.rb b/spec/models/proposal_spec.rb index 3200c7123..52896e0da 100644 --- a/spec/models/proposal_spec.rb +++ b/spec/models/proposal_spec.rb @@ -12,6 +12,11 @@ describe Proposal do expect(proposal).to_not be_valid end + it "should not be valid without an question" do + proposal.question = nil + expect(proposal).to_not be_valid + end + it "should not be valid without a title" do proposal.title = nil expect(proposal).to_not be_valid