14 failures after updating mysql branch to master

This commit is contained in:
Raphael 2010-12-26 17:25:07 -08:00
parent b642cd6840
commit 3e7e99831a
6 changed files with 9 additions and 10 deletions

View file

@ -70,8 +70,7 @@ module SocketsHelper
post = object.post
action_hash[:comment_id] = object.id
action_hash[:my_post?] = (post.person.owner_id == uid)
action_hash[:notification] = notification(object)
action_hash[:post_guid] = post.id
action_hash[:post_guid] = post.guid
end

View file

@ -265,7 +265,7 @@ class User < ActiveRecord::Base
params[:image_url_small] = photo.url(:thumb_small)
end
if self.person.profile.update_attributes(params)
push_to_people profile, contact_people
push_to_people profile, self.contacts.includes(:person).map{|c| c.person}
true
else
false

View file

@ -69,7 +69,7 @@ describe AspectsController do
end
it "assigns contacts to only non-pending" do
@user.contacts.count.should == 1
@user.send_contact_request_to(make_user.person, @aspect)
@user.send_contact_request_to(Factory(:user).person, @aspect)
@user.contacts.count.should == 2
get :show, 'id' => @aspect.id.to_s
@ -128,7 +128,7 @@ describe AspectsController do
end
it "assigns contacts to only non-pending" do
@user.contacts.count.should == 1
@user.send_contact_request_to(make_user.person, @aspect)
@user.send_contact_request_to(Factory(:user).person, @aspect)
@user.contacts.count.should == 2
get :manage

View file

@ -40,7 +40,7 @@ Factory.define :user do |u|
user.person = Factory.build(:person, :profile => Factory.create(:profile),
:owner_id => user.id,
:serialized_public_key => user.encryption_key.public_key.export,
:diaspora_handle => "#{user.username}@#{APP_CONFIG[:pod_url].gsub(/(https?:|www\.)\/\//, '').chop!}")
:diaspora_handle => "#{user.username}@#{AppConfig[:pod_url].gsub(/(https?:|www\.)\/\//, '').chop!}")
end
end

View file

@ -58,9 +58,9 @@ describe Notification do
end
it 'sockets to the recipient' do
request = Request.instantiate(:from => @user.person, :to => @user2.person, :into => @aspect)
request = Request.diaspora_initialize(:from => @user.person, :to => @user2.person, :into => @aspect)
opts = {:target_id => request.id,
:kind => request.notification_type(@user, @person),
:target_type => request.notification_type(@user, @person),
:person_id => @person.id,
:user_id => @user.id}

View file

@ -265,7 +265,7 @@ describe User do
it "only pushes to non-pending contacts" do
connect_users(user, aspect, user2, aspect2)
user.contacts.count.should == 1
user.send_contact_request_to(make_user.person, aspect)
user.send_contact_request_to(Factory(:user).person, aspect)
user.contacts.count.should == 2
user.should_receive(:push_to_person).once
@ -300,7 +300,7 @@ describe User do
context 'aspects' do
it 'should delete an empty aspect' do
user.drop_aspect(aspect)
user.aspects.include?(aspect).should == false
user.aspects(true).include?(aspect).should == false
end
it 'should not delete an aspect with contacts' do