<commit_before>require 'spec_helper'

describe PortfolioPhoto do

end<commit_msg>filled out portfolio photo model spec<commit_after>require 'spec_helper'

describe PortfolioPhoto do

  # This should return the minimal set of attributes required
  # to create a valid object.
  def valid_attributes
    { :portfolio_id => 1, :title => 'Fake Title' }
  end

  # ****
  # Validations
  it { should validate_presence_of(:title) }
  it { should ensure_length_of(:title).is_at_most(100) }

  it "shoud be protected from mass attribute assignment" do
    time = 2.days.ago
    portfolio_photo = PortfolioPhoto.create( valid_attributes.merge( { :id => 4444, :created_at => time } ) )
    portfolio_photo.id.should_not eql(444)
    portfolio_photo.created_at.to_i.should_not eql(time.to_i)
  end

end
{'fraction_non_alphanumeric': 0.09355246523388117, 'fraction_numerical': 0.015170670037926675, 'mean_word_length': 4.351351351351352, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4993568', 'n_tokens_mistral': 266, 'n_tokens_neox': 253, 'n_words': 68}