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
|
rich_media
|
||||||
multi_photo
|
multi_photo
|
||||||
photo_backdrop
|
photo_backdrop
|
||||||
|
activity_streams_photo
|
||||||
status
|
status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -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
|
||||||
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
|
||||||
Loading…
Reference in a new issue