Merge pull request #4407 from rogerbraun/feature/spv-photo-background-removal

SPV photo background removal,
This commit is contained in:
Jonne Haß 2013-08-16 14:05:11 +02:00
commit 30778ffbd0
3 changed files with 8 additions and 6 deletions

View file

@ -37,6 +37,7 @@
* Fix mobile search tags [#4392](https://github.com/diaspora/diaspora/issues/4392)
* Remove placeholders for name fields in settings (no more Sofaer) [#4385](https://github.com/diaspora/diaspora/pull/4385)
* Problems with layout the registration page for mobile. [#4396](https://github.com/diaspora/diaspora/issues/4396)
* Do not display photos in the background in the SPV [#4407](https://github.com/diaspora/diaspora/pull/4407)
## Features
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)

View file

@ -28,7 +28,7 @@ class TemplatePicker
end
def photo_backdrop?
post.photos.size == 1
false # No backdrop, ever.
end
def status?

View file

@ -24,9 +24,9 @@ describe TemplatePicker do
end
describe '#status_with_photo_backdrop?' do
it 'is true if the post contains a single photo and text' do
it 'is false even if the post contains a single photo and text' do
@post_stubs.merge!(:photos => stub(:size => 1))
TemplatePicker.new(post).should be_status_with_photo_backdrop
TemplatePicker.new(post).should_not be_status_with_photo_backdrop
end
end
@ -37,9 +37,9 @@ describe TemplatePicker do
end
describe '#photo_backdrop?' do
it 'is true if the post contains only one photo' do
it 'is false even if the post contains only one photo' do
@post_stubs.merge!(:photos => stub(:size => 1))
TemplatePicker.new(post).should be_photo_backdrop
TemplatePicker.new(post).should_not be_photo_backdrop
end
end
@ -51,7 +51,8 @@ describe TemplatePicker do
end
describe 'factories' do
TemplatePicker::TEMPLATES.each do |template|
# No photo_backdrop for now.
(TemplatePicker::TEMPLATES - ['status_with_photo_backdrop', 'photo_backdrop']).each do |template|
describe "#{template} factory" do
it 'works' do
post = FactoryGirl.build(template.to_sym, :author => alice.person)