RS IZ one more test passing going to bisect
This commit is contained in:
parent
7ccf391ca5
commit
773dbd91aa
2 changed files with 15 additions and 7 deletions
|
|
@ -16,6 +16,7 @@ class Photo < Post
|
||||||
|
|
||||||
|
|
||||||
def remote_photo
|
def remote_photo
|
||||||
|
puts image.url
|
||||||
User.owner.url.chop + image.url
|
User.owner.url.chop + image.url
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,19 @@ describe Photo do
|
||||||
fixture_binary = File.open(@fixture_name).read
|
fixture_binary = File.open(@fixture_name).read
|
||||||
binary.should == fixture_binary
|
binary.should == fixture_binary
|
||||||
end
|
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
|
describe 'non-image files' do
|
||||||
it 'should not store' do
|
it 'should not store' do
|
||||||
file = File.open(@fail_fixture_name)
|
file = File.open(@fail_fixture_name)
|
||||||
|
|
@ -33,13 +46,7 @@ describe Photo do
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
describe 'with encryption' do
|
describe 'with encryption' do
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue