added silly debug toggle
This commit is contained in:
parent
f9879752d3
commit
5cade230ac
5 changed files with 12 additions and 9 deletions
|
|
@ -85,6 +85,4 @@
|
|||
|
||||
#content
|
||||
= yield
|
||||
|
||||
#debug
|
||||
.msg
|
||||
= render "posts/debug"
|
||||
|
|
|
|||
|
|
@ -1,13 +1,12 @@
|
|||
module Diaspora
|
||||
module Webhooks
|
||||
include ApplicationHelper
|
||||
def self.included(klass)
|
||||
klass.class_eval do
|
||||
after_save :notify_friends
|
||||
@@queue = MessageHandler.new
|
||||
|
||||
def notify_friends
|
||||
if mine? self
|
||||
if self.person_id == User.first.id
|
||||
xml = Post.build_xml_for(self)
|
||||
@@queue.add_post_request( friends_with_permissions, xml )
|
||||
@@queue.process
|
||||
|
|
|
|||
|
|
@ -29,6 +29,12 @@ $(document).ready(function(){
|
|||
$(this).val("")
|
||||
});
|
||||
|
||||
$('#debug_info').click(function() {
|
||||
$('#debug_more').toggle('fast', function() {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
$('#flash_notice, #flash_error, #flash_alert').delay(1500).slideUp(130);
|
||||
|
|
|
|||
|
|
@ -37,20 +37,20 @@ describe StatusMessagesController do
|
|||
end
|
||||
|
||||
it "destroy action should destroy model and redirect to index action" do
|
||||
delete :destroy, :id => @status_message.id
|
||||
delete :destroy, :id => @status_message._id
|
||||
response.should redirect_to(status_messages_url)
|
||||
StatusMessage.first(:conditions => {:id => @status_message.id }).nil?.should be true
|
||||
end
|
||||
|
||||
it "show action should render show template" do
|
||||
get :show, :id => @status_message.id
|
||||
get :show, :id => @status_message.post_id
|
||||
response.should render_template(:show)
|
||||
end
|
||||
|
||||
it "should return xml on show type if the MIME type exists" do
|
||||
request.env["HTTP_ACCEPT"] = "application/xml"
|
||||
message = StatusMessage.first
|
||||
get :show, :id => message.id
|
||||
get :show, :id => message.post_id
|
||||
response.body.include?(message.to_xml.to_s).should be true
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Rspec.configure do |config|
|
|||
|
||||
config.before(:each) do
|
||||
DatabaseCleaner.start
|
||||
WebSocket.stub!(:update_clients)
|
||||
#WebSocket.stub!(:update_clients)
|
||||
end
|
||||
|
||||
config.after(:each) do
|
||||
|
|
|
|||
Loading…
Reference in a new issue