Merge pull request #4407 from rogerbraun/feature/spv-photo-background-removal
SPV photo background removal,
This commit is contained in:
commit
30778ffbd0
3 changed files with 8 additions and 6 deletions
|
|
@ -37,6 +37,7 @@
|
||||||
* Fix mobile search tags [#4392](https://github.com/diaspora/diaspora/issues/4392)
|
* 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)
|
* 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)
|
* 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
|
## Features
|
||||||
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
|
* Admin: add option to find users under 13 (COPPA) [#4252](https://github.com/diaspora/diaspora/pull/4252)
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ class TemplatePicker
|
||||||
end
|
end
|
||||||
|
|
||||||
def photo_backdrop?
|
def photo_backdrop?
|
||||||
post.photos.size == 1
|
false # No backdrop, ever.
|
||||||
end
|
end
|
||||||
|
|
||||||
def status?
|
def status?
|
||||||
|
|
|
||||||
|
|
@ -24,9 +24,9 @@ describe TemplatePicker do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#status_with_photo_backdrop?' do
|
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))
|
@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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -37,9 +37,9 @@ describe TemplatePicker do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe '#photo_backdrop?' do
|
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))
|
@post_stubs.merge!(:photos => stub(:size => 1))
|
||||||
TemplatePicker.new(post).should be_photo_backdrop
|
TemplatePicker.new(post).should_not be_photo_backdrop
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
@ -51,7 +51,8 @@ describe TemplatePicker do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'factories' do
|
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
|
describe "#{template} factory" do
|
||||||
it 'works' do
|
it 'works' do
|
||||||
post = FactoryGirl.build(template.to_sym, :author => alice.person)
|
post = FactoryGirl.build(template.to_sym, :author => alice.person)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue