ambition/spec/models/comment_spec.rb

15 lines
331 B
Ruby

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