From 7ea6b4dd8dfb48bbf0bab151a6cbf85f5136d4c9 Mon Sep 17 00:00:00 2001 From: maxwell Date: Wed, 5 Jan 2011 11:33:39 -0800 Subject: [PATCH] more cleanup --- app/models/comment.rb | 2 -- app/views/layouts/application.html.haml | 3 ++- spec/lib/diaspora/webhooks_spec.rb | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 spec/lib/diaspora/webhooks_spec.rb diff --git a/app/models/comment.rb b/app/models/comment.rb index 83765d4c9..372f38571 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -54,8 +54,6 @@ class Comment if user.owns?(self.post) p = user.people_in_aspects(user.aspects_with_post(self.post_id)) elsif user.owns?(self) -:A - p = [self.post.person] end p diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 5115a3c1a..4a052c3d2 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -35,7 +35,7 @@ = include_javascripts :main - if current_user - = include_javascripts :flash_socket unless modern_browser? + = include_javascripts :flash_socket #unless modern_browser? = javascript_include_tag 'web-socket-receiver' = render 'js/websocket_js' @@ -86,6 +86,7 @@ .clearfix + =render :partial => 'layouts/debug.haml' %footer .container = image_tag 'powered_by_diaspora.png', :height => "11px", :width => "145px" diff --git a/spec/lib/diaspora/webhooks_spec.rb b/spec/lib/diaspora/webhooks_spec.rb new file mode 100644 index 000000000..590b737b7 --- /dev/null +++ b/spec/lib/diaspora/webhooks_spec.rb @@ -0,0 +1,19 @@ +# Copyright (c) 2010, Diaspora Inc. This file is +# licensed under the Affero General Public License version 3 or later. See +# the COPYRIGHT file. + +require 'spec_helper' + +describe Diaspora::Webhooks do + describe '#subscribers' do + it 'throws an error if the including module does not redefine it' do + class Foo + include Diaspora::Webhooks + end + + f = Foo.new + + proc{ f.subscribers(1)}.should raise_error /override subscribers/ + end + end +end