1
0
mirror of https://github.com/danbee/danbarberphoto synced 2025-03-04 08:49:07 +00:00

Fix most specs

This commit is contained in:
Daniel Barber 2015-10-29 17:15:10 +00:00
parent 600458997b
commit 6658c03d66
3 changed files with 2 additions and 5 deletions

View File

@ -15,8 +15,8 @@ class Photo < ActiveRecord::Base
title
end
def image=(image_path)
@image = CloudinaryImage.create(image_path)
def image=(file_upload)
@image = CloudinaryImage.create(file_upload)
self.image_cloudinary_id = @image.id
end

View File

@ -4,6 +4,5 @@ FactoryGirl.define do
factory :photo do
title 'A Photo'
description 'A lovely photo of a tree'
image nil
end
end

View File

@ -3,8 +3,6 @@ require 'spec_helper'
describe Photo do
it { should have_and_belong_to_many(:categories) }
it { should validate_presence_of(:image) }
let(:photo) { create(:photo) }
it 'logs a view' do