RS, IZ; Fix Photo.instantiate, make photo url include spec a little more specific
This commit is contained in:
parent
e2c0ae2cee
commit
b8a2e8ecdf
3 changed files with 2 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ class Photo < Post
|
|||
photo = Photo.new(params)
|
||||
photo.image.store! image_file
|
||||
photo.save
|
||||
photo
|
||||
end
|
||||
|
||||
after_save :log_save_inspection
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -59,7 +59,7 @@ describe Photo do
|
|||
@photo.image.store! File.open(@fixture_name)
|
||||
puts @photo.image.url(:thumb_medium)
|
||||
@photo.image.url.include?(@fixture_filename).should be false
|
||||
@photo.image.url(:thumb_medium).include?(@fixture_filename).should be false
|
||||
@photo.image.url(:thumb_medium).include?("/" + @fixture_filename).should be false
|
||||
end
|
||||
|
||||
describe 'non-image files' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue