adds debate model specs [#5]
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user