diff --git a/spec/lib/diaspora/ostatus_builder_spec.rb b/spec/lib/diaspora/ostatus_builder_spec.rb index d9b437ec86f41e66ffd1358af0a3c732a49d7fdb..13fbde17a3718121904bbeb2efcc74af6b4128b9 100644 --- a/spec/lib/diaspora/ostatus_builder_spec.rb +++ b/spec/lib/diaspora/ostatus_builder_spec.rb @@ -28,5 +28,12 @@ describe Diaspora::OstatusBuilder do public_status_messages.each{ |status| atom.should include status.message } end + it 'should iterate through all objects, and not stop if it runs into a post without a to_activity' do + messages = public_status_messages.collect{|x| x.message} + public_status_messages.insert(1, []) + director = Diaspora::Director.new; + atom2 = director.build(Diaspora::OstatusBuilder.new(user, public_status_messages)) + messages.each{ |status| atom2.should include status.message } + end end