|
require 'rails_helper'
|
|
|
|
RSpec.describe Comment , type: model do
|
|
|
|
it 'has a valid factory' do
|
|
expect(build(:comment)).to be_valid
|
|
end
|
|
|
|
describe "comment content test" do
|
|
it 'the content should not be empty' do
|
|
expect(build(:comment, content: nil)).not_to be_valid
|
|
end
|
|
end
|
|
|
|
end |