Skip to content
Extraits de code Groupes Projets
Valider 0ab8ef1d rédigé par Maxwell Salzberg's avatar Maxwell Salzberg Validation de danielgrippi
Parcourir les fichiers

basic support for activity streams photos

parent 25cf7760
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -6,6 +6,7 @@ class TemplatePicker ...@@ -6,6 +6,7 @@ class TemplatePicker
rich_media rich_media
multi_photo multi_photo
photo_backdrop photo_backdrop
activity_streams_photo
status status
} }
...@@ -41,6 +42,10 @@ class TemplatePicker ...@@ -41,6 +42,10 @@ class TemplatePicker
post.photos.size == 1 post.photos.size == 1
end end
def activity_streams_photo?
post.type == "ActivityStreams::Photo"
end
def status? def status?
post.text? post.text?
end end
......
...@@ -61,4 +61,12 @@ describe TemplatePicker do ...@@ -61,4 +61,12 @@ describe TemplatePicker do
TemplatePicker.new(post).should be_status TemplatePicker.new(post).should be_status
end end
end end
describe '#activity_stream_photo' do
it 'is true if the post is of type activity_streams_photo' do
photo = stub(:type => "ActivityStreams::Photo")
TemplatePicker.new(photo).should be_activity_streams_photo
end
end
end end
\ No newline at end of file
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter