Sha256: 236a3c1cb4f9b188ae3ed7a3684f6b0ed300cc1e8eb5217ccb1c36ce41b63443

Contents?: true

Size: 378 Bytes

Versions: 3

Compression:

Stored size: 378 Bytes

Contents

require "spec_helper"

describe Blogr::Comment do
    
  it "has a valid factory" do
  	FactoryGirl.create(:blogr_comment).should be_valid
  end

  it "is invalid without a post" do
  	FactoryGirl.build(:blogr_comment, post_id: nil).should_not be_valid
  end

  it "is invalid without content" do
  	FactoryGirl.build(:blogr_comment, content: nil).should_not be_valid
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
blogr-0.0.8 spec/models/blogr/comment_spec.rb
blogr-0.0.7 spec/models/blogr/comment_spec.rb
blogr-0.0.6 spec/models/blogr/comment_spec.rb