adds author validation spec [#11]

This commit is contained in:
rgarcia
2015-07-18 15:09:28 +02:00
parent bcd96ab1b4
commit 967b5cdcb5

View File

@@ -10,6 +10,11 @@ describe Debate do
expect(@debate).to be_valid
end
it "should not be valid without an author" do
@debate.author = nil
expect(@debate).to_not be_valid
end
it "should not be valid without a title" do
@debate.title = nil
expect(@debate).to_not be_valid