diff --git a/spec/models/debate_spec.rb b/spec/models/debate_spec.rb index 768e6feec..490eea985 100644 --- a/spec/models/debate_spec.rb +++ b/spec/models/debate_spec.rb @@ -1,5 +1,28 @@ require 'rails_helper' -RSpec.describe Debate, type: :model do - pending "add some examples to (or delete) #{__FILE__}" +describe Debate do + + before(:each) do + @debate = build(:debate) + end + + it "should be valid" do + expect(@debate).to be_valid + end + + it "should not be valid without a title" do + @debate.title = nil + expect(@debate).to_not be_valid + end + + it "should not be valid without a description" do + @debate.description = nil + expect(@debate).to_not be_valid + end + + it "should not be valid without accepting terms of service" do + @debate.terms_of_service = nil + expect(@debate).to_not be_valid + end + end