Skip to content
Extraits de code Groupes Projets
Valider 899d82b7 rédigé par Sarah Mei's avatar Sarah Mei
Parcourir les fichiers

Fix 1 of 2 pending photo specs.

parent 36c6043e
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -11,16 +11,16 @@ describe Photo do
@album = @user.post :album, :name => "foo", :to => @aspect.id
@fixture_filename = 'button.png'
@fixture_name = File.dirname(__FILE__) + '/../fixtures/button.png'
@fail_fixture_name = File.dirname(__FILE__) + '/../fixtures/msg.xml'
@fixture_name = File.join(File.dirname(__FILE__), '..', 'fixtures', @fixture_filename)
@fail_fixture_name = File.join(File.dirname(__FILE__), '..', 'fixtures', 'msg.xml')
@photo = Photo.new(:person => @user.person, :album => @album)
end
it 'should have a constructor' do
pending "Figure out how to make the photo posting api work in specs, it needs a file type"
it 'has a constructor' do
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.image.read.nil?.should be false
end
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter