MS added test, things still seem broken though
This commit is contained in:
parent
b797704a14
commit
66f66b85a6
4 changed files with 15 additions and 4 deletions
|
|
@ -1,6 +1,6 @@
|
|||
class PublicsController < ApplicationController
|
||||
include ApplicationHelper
|
||||
include PublicsHelper
|
||||
require 'lib/diaspora/diaspora_parser'
|
||||
include Diaspora::DiasporaParser
|
||||
include Diaspora::OStatusParser
|
||||
|
||||
def hcard
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
module ApplicationHelper
|
||||
require 'lib/diaspora/diaspora_parser'
|
||||
include Diaspora::DiasporaParser
|
||||
def object_path(object)
|
||||
eval("#{object.class.to_s.underscore}_path(object)")
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,6 +8,18 @@ describe PublicsController do
|
|||
request.env['warden'] = mock_model(Warden, :authenticate? => @user, :authenticate! => @user, :authenticate => @user)
|
||||
end
|
||||
|
||||
describe 'receive endpoint' do
|
||||
|
||||
it 'should accept a post from anohter node and save the information' do
|
||||
|
||||
person = Factory.create(:person)
|
||||
message = StatusMessage.new(:message => 'foo', :person => person)
|
||||
StatusMessage.all.count.should == 0
|
||||
post :receive, {:xml => Post.build_xml_for(message)}
|
||||
StatusMessage.all.count.should == 1
|
||||
end
|
||||
end
|
||||
|
||||
describe 'PubSubHubBuB intergration' do
|
||||
|
||||
describe 'incoming subscriptions' do
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ Factory.define :user do |u|
|
|||
end
|
||||
Factory.define :status_message do |m|
|
||||
m.sequence(:message) {|n| "jimmy's #{n} whales"}
|
||||
m.person
|
||||
end
|
||||
|
||||
Factory.define :blog do |b|
|
||||
|
|
|
|||
Loading…
Reference in a new issue