basic support for activity streams photos
This commit is contained in:
parent
25cf776059
commit
0ab8ef1d08
2 changed files with 13 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ class TemplatePicker
|
|||
rich_media
|
||||
multi_photo
|
||||
photo_backdrop
|
||||
activity_streams_photo
|
||||
status
|
||||
}
|
||||
|
||||
|
|
@ -41,6 +42,10 @@ class TemplatePicker
|
|||
post.photos.size == 1
|
||||
end
|
||||
|
||||
def activity_streams_photo?
|
||||
post.type == "ActivityStreams::Photo"
|
||||
end
|
||||
|
||||
def status?
|
||||
post.text?
|
||||
end
|
||||
|
|
|
|||
|
|
@ -61,4 +61,12 @@ describe TemplatePicker do
|
|||
TemplatePicker.new(post).should be_status
|
||||
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
|
||||
Loading…
Reference in a new issue