Fix 1 of 2 pending photo specs.

This commit is contained in:
Sarah Mei 2010-10-08 02:15:07 -06:00
parent 36c6043e8e
commit 899d82b766

View file

@ -11,16 +11,16 @@ describe Photo do
@album = @user.post :album, :name => "foo", :to => @aspect.id @album = @user.post :album, :name => "foo", :to => @aspect.id
@fixture_filename = 'button.png' @fixture_filename = 'button.png'
@fixture_name = File.dirname(__FILE__) + '/../fixtures/button.png' @fixture_name = File.join(File.dirname(__FILE__), '..', 'fixtures', @fixture_filename)
@fail_fixture_name = File.dirname(__FILE__) + '/../fixtures/msg.xml' @fail_fixture_name = File.join(File.dirname(__FILE__), '..', 'fixtures', 'msg.xml')
@photo = Photo.new(:person => @user.person, :album => @album) @photo = Photo.new(:person => @user.person, :album => @album)
end end
it 'should have a constructor' do it 'has a constructor' do
pending "Figure out how to make the photo posting api work in specs, it needs a file type"
image = File.open(@fixture_name) image = File.open(@fixture_name)
photo = Photo.instantiate(:person => @user.person, :album => @album, :user_file => [image]) photo = Photo.instantiate(
:person => @user.person, :album => @album, :user_file => image)
photo.created_at.nil?.should be false photo.created_at.nil?.should be false
photo.image.read.nil?.should be false photo.image.read.nil?.should be false
end end