DG MS; removed signup link and route

This commit is contained in:
maxwell 2010-06-18 10:48:37 -07:00
parent 043924b5f5
commit d4bf2f539d
5 changed files with 34 additions and 8 deletions

View file

@ -1,5 +1,5 @@
class StatusMessagesController < ApplicationController class StatusMessagesController < ApplicationController
#before_filter :authenticate_user! before_filter :authenticate_user!
include StatusMessagesHelper include StatusMessagesHelper
def index def index

View file

@ -1,9 +1,9 @@
- if controller_name != 'sessions' - if controller_name != 'sessions'
= link_to "Sign in", new_session_path(resource_name) = link_to "Sign in", new_session_path(resource_name)
%br/ %br/
- if devise_mapping.registerable? && controller_name != 'registrations' /- if devise_mapping.registerable? && controller_name != 'registrations'
= link_to "Sign up", new_registration_path(resource_name) /= link_to "Sign up", new_registration_path(resource_name)
%br/ /%br/
- if devise_mapping.recoverable? && controller_name != 'passwords' - if devise_mapping.recoverable? && controller_name != 'passwords'
= link_to "Forgot your password?", new_password_path(resource_name) = link_to "Forgot your password?", new_password_path(resource_name)
%br/ %br/

View file

@ -12,7 +12,7 @@ Diaspora::Application.routes.draw do |map|
devise_for :users, :path_names => {:sign_up => "signup", :sign_in => "login", :sign_out => "logout"} devise_for :users, :path_names => {:sign_up => "signup", :sign_in => "login", :sign_out => "logout"}
match 'login', :to => 'devise/sessions#new', :as => "new_user_session" match 'login', :to => 'devise/sessions#new', :as => "new_user_session"
match 'logout', :to => 'devise/sessions#destroy', :as => "destroy_user_session" match 'logout', :to => 'devise/sessions#destroy', :as => "destroy_user_session"
match 'signup', :to => 'devise/registrations#new', :as => "new_user_registration" #match 'signup', :to => 'devise/registrations#new', :as => "new_user_registration"
match 'receive', :to => 'dashboard#receive' match 'receive', :to => 'dashboard#receive'

View file

@ -3,7 +3,7 @@ module Diaspora
module Webhooks module Webhooks
def self.included(klass) def self.included(klass)
klass.class_eval do klass.class_eval do
before_save :notify_friends after_save :notify_friends
@@queue = MessageHandler.new @@queue = MessageHandler.new

View file

@ -1,11 +1,13 @@
require File.dirname(__FILE__) + '/../spec_helper' require File.dirname(__FILE__) + '/../spec_helper'
include Diaspora include Diaspora
describe Diaspora do describe Diaspora do
describe Webhooks do describe Webhooks do
before do before do
@user = Factory.create(:user)
@post = Factory.build(:post) @post = Factory.build(:post)
end end
@ -30,11 +32,35 @@ describe Diaspora do
end end
it "should send all prepped webhooks to be processed" do it "should send all prepped webhooks to be processed" do
MessageHandler.any_instance.stubs(:add_post_request).returns(true) MessageHandler.any_instance.stubs(:add_post_request).returns true
MessageHandler.any_instance.stubs(:process).returns(true) MessageHandler.any_instance.stubs(:process).returns true
@post.notify_friends.should be true @post.notify_friends.should be true
end end
it "should check that it only sends a user's posts to their friends" do
Factory.create(:friend, :url => "http://www.bob.com")
Factory.create(:friend, :url => "http://www.alice.com")
Factory.create(:status_message)
Factory.create(:bookmark)
# this is a messagequeue thing; out of scope for webhooks action
end
it "should ensure no duplicate url posts" do
pending
# this is a messagequeue thing; out of scope for webhooks action
end
it "should build an xml object containing multiple Post types" do
Factory.create(:status_message)
Factory.create(:bookmark)
stream = Post.stream
xml = Post.build_xml_for(stream)
xml.should include "<status_message>"
xml.should include "<bookmark>"
end
end end
end end