adds author validation spec [#11]

This commit is contained in:
rgarcia
2015-07-18 15:09:28 +02:00
parent 4ed8881116
commit 0cb0a691c8

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