Skip to content
Extraits de code Groupes Projets
Valider 773dbd91 rédigé par ilya's avatar ilya
Parcourir les fichiers

RS IZ one more test passing going to bisect

parent 7ccf391c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -16,6 +16,7 @@ class Photo < Post
def remote_photo
puts image.url
User.owner.url.chop + image.url
end
......
......@@ -15,6 +15,19 @@ describe Photo do
fixture_binary = File.open(@fixture_name).read
binary.should == fixture_binary
end
it 'must have an album' do
photo = Photo.new(:person => @user)
file = File.open(@fixture_name)
photo.image = file
photo.save
photo.valid?.should be false
photo.album = Album.create(:name => "foo", :person => @user)
photo.save
Photo.first.album.name.should == 'foo'
end
describe 'non-image files' do
it 'should not store' do
file = File.open(@fail_fixture_name)
......@@ -33,13 +46,7 @@ describe Photo do
end
it 'must have an album' do
photo = Photo.new(:person => @user)
photo.valid?.should be false
photo.album = Album.new(:name => "foo", :person => @user)
photo.save
Photo.first.album.name.should == 'foo'
end
end
describe 'with encryption' do
......
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