Delete all pending specs except stuff we actually want to fix in the short term. Add more useful comments to those.

This commit is contained in:
Sarah Mei 2011-11-06 21:29:22 -08:00
parent 35216808e0
commit f1d669a024
17 changed files with 14 additions and 138 deletions

View file

@ -99,14 +99,6 @@ describe PostsController do
end end
it 'shows a public photo' do
pending
status = Factory(:status_message_with_photo, :public => true, :author => alice.person)
photo = status.photos.first
get :show, :id => photo.id
response.status.should == 200
end
it 'does not show a private post' do it 'does not show a private post' do
status = alice.post(:status_message, :text => "hello", :public => false, :to => 'all') status = alice.post(:status_message, :text => "hello", :public => false, :to => 'all')
get :show, :id => status.id get :show, :id => status.id

View file

@ -155,13 +155,6 @@ describe ServicesController do
@invite_params = {:provider => 'facebook', :uid => @uid, :aspect_id => @user.aspects.first.id} @invite_params = {:provider => 'facebook', :uid => @uid, :aspect_id => @user.aspects.first.id}
end end
it 'enqueues an invite job if the fb user has a username' do
pending
@invite_params[:provider] = "email"
@invite_params[:uid] = "username@facebook.com"
put :inviter, @invite_params
end
it 'redirects to a prefilled facebook message url' do it 'redirects to a prefilled facebook message url' do
put :inviter, @invite_params put :inviter, @invite_params
response.location.should match(/https:\/\/www\.facebook\.com\/\?compose=1&id=.*&subject=.*&message=.*&sk=messages/) response.location.should match(/https:\/\/www\.facebook\.com\/\?compose=1&id=.*&subject=.*&message=.*&sk=messages/)

View file

@ -1,25 +1,21 @@
require 'spec_helper' require 'spec_helper'
describe 'dispatching' do describe "Dispatching" do
before do context "a comment retraction on a public post" do
pending "TEST POLUTION HERE :(" it "should trigger a private dispatch" do
@luke, @leia, @raph = set_up_friends pending "Running this causes test failures in the relayable specs. If you can figure out why, you'll be OUR HERO. <3 <3"
end luke, leia, raph = set_up_friends
context "lukes' comment on luke's public post gets retracted" do
it 'should not trigger a public dispatch' do
#luke has a public post and comments on it
p = Factory(:status_message, :public => true, :author => @luke.person)
c = @luke.comment("awesomesauseum", :post => p)
# Luke has a public post and comments on it
p = Factory(:status_message, :public => true, :author => luke.person)
c = luke.comment("awesomesauseum", :post => p)
Postzord::Dispatcher::Public.should_not_receive(:new) # Luke now retracts his comment
Postzord::Dispatcher::Private.should_receive(:new).and_return(stub(:post => true)) Postzord::Dispatcher::Public.should_not_receive(:new)
#luke now retracts his comment Postzord::Dispatcher::Private.should_receive(:new).and_return(stub(:post => true))
fantasy_resque do fantasy_resque do
@luke.retract(c) luke.retract(c)
end end
end end
end end
end end

View file

@ -104,8 +104,6 @@ describe RedisCache do
@cache.populate! @cache.populate!
end end
it 'adds the post from the hash to the cache'
end end
describe "#trim!" do describe "#trim!" do

View file

@ -74,17 +74,6 @@ describe HydraWrapper do
end end
describe '#insert_job' do
it 'creates a new request object'
it 'calls #prepare_request! on a new request object'
it 'adds request to the hydra queue'
end
describe '#prepare_request!' do
it 'calls Pod.find_or_create_by_url'
it 'calls Person.url_batch_update'
end
describe '#redirecting_to_https?!' do describe '#redirecting_to_https?!' do
it 'does not execute unless response has a 3xx code' do it 'does not execute unless response has a 3xx code' do
resp = stub(:code => 200) resp = stub(:code => 200)

View file

@ -23,12 +23,6 @@ describe Postzord::Receiver::LocalBatch do
receiver.receive! receiver.receive!
end end
it 'sockets to users' do
pending 'not currently socketing'
receiver.should_receive(:socket_to_users)
receiver.receive!
end
it 'notifies mentioned users' do it 'notifies mentioned users' do
receiver.should_receive(:notify_mentioned_users) receiver.should_receive(:notify_mentioned_users)
receiver.receive! receiver.receive!
@ -100,11 +94,6 @@ describe Postzord::Receiver::LocalBatch do
receiver.perform! receiver.perform!
end end
it 'calls socket_to_users' do
pending 'not currently socketing'
receiver.should_receive(:socket_to_users)
receiver.perform!
end
it 'does not call create_visibilities and notify_mentioned_users' do it 'does not call create_visibilities and notify_mentioned_users' do
receiver.should_not_receive(:notify_mentioned_users) receiver.should_not_receive(:notify_mentioned_users)
receiver.should_not_receive(:create_share_visibilities) receiver.should_not_receive(:create_share_visibilities)

View file

@ -99,8 +99,6 @@ describe Postzord::Receiver::Public do
@receiver = Postzord::Receiver::Public.new(xml) @receiver = Postzord::Receiver::Public.new(xml)
end end
it 'raises if parent object does not exist'
it 'receives only for the parent author if he is local to the pod' do it 'receives only for the parent author if he is local to the pod' do
comment = stub.as_null_object comment = stub.as_null_object
@receiver.instance_variable_set(:@object, comment) @receiver.instance_variable_set(:@object, comment)

View file

@ -1,11 +0,0 @@
require 'spec_helper'
describe Base64 do
describe ".urlsafe_encode64_stripped" do
it "strips the trailing '=' from the url_safe characters" do
pending
Base64.should_receive(:urlsafe_encode64).and_return("MTIzMTIzMQ==")
Base64.urlsafe_encode64_stripped("random stuff").should == "MTIzMTIzMQ"
end
end
end

View file

@ -129,14 +129,6 @@ describe Statistics do
end end
end end
describe "#generate_correlations" do describe "#generate_correlations" do
it 'it returns a hash of including start and end time' do
pending
hash = @stats.correlation_hash
hash[:start_time].should == @time
hash[:end_time].should == @time - 1.week
end
it 'returns the post count (and sign_in_count) correlation' do it 'returns the post count (and sign_in_count) correlation' do
bob.sign_in_count = 1 bob.sign_in_count = 1
bob.post(:status_message, :text => "here is a message") bob.post(:status_message, :text => "here is a message")

View file

@ -34,7 +34,7 @@ describe Stream::Tag do
end end
it 'displays a post with a comment containing the tag search' do it 'displays a post with a comment containing the tag search' do
pending "toooo slow" pending "this code is way too slow. need to re-implement in a way that doesn't suck"
other_post = bob.post(:status_message, :text => "sup y'all", :to => 'all') other_post = bob.post(:status_message, :text => "sup y'all", :to => 'all')
Factory(:comment, :text => "#what", :post => other_post) Factory(:comment, :text => "#what", :post => other_post)
@stream.posts.should == [other_post] @stream.posts.should == [other_post]

View file

@ -74,18 +74,6 @@ describe Invitation do
invite.send! invite.send!
}.should_not change(User, :count) }.should_not change(User, :count)
end end
it 'handles the case when that user has an invite but not a user' do
pending
end
it 'handles the case where that user has an invite but has not yet accepted' do
pending
end
it 'generate the invitation token and pass it to the user' do
pending
end
end end
describe '.batch_invite' do describe '.batch_invite' do

View file

@ -1,18 +0,0 @@
require 'spec_helper'
describe Jobs::ReceiveLocalBatch do
#takes author id, post id and array of receiving user ids
#for each recipient, it gets the aspects that the author is in
#Gets all the aspect ids, and inserts into share_visibilities for each aspect
#Then it sockets to those users
#And notifies mentioned people
before do
@post = alice.build_post(:status_message, :text => 'Hey Bob')
@post.save!
end
describe '.perform' do
it 'calls Postzord::Receiver::LocalBatch' do
pending
end
end
end

View file

@ -1,5 +0,0 @@
require 'spec_helper'
describe OEmbedCache do
pending "add some examples to (or delete) #{__FILE__}"
end

View file

@ -91,16 +91,7 @@ describe Photo do
Photo.diaspora_initialize( Photo.diaspora_initialize(
:author => @user.person, :image_url => url) :author => @user.person, :image_url => url)
end end
context "with neither" do
it 'does not return a valid object' do
pending
Photo.diaspora_initialize(
:author => @user.person).valid?.should be_false
end
end
end end
end end
describe '#update_remote_path' do describe '#update_remote_path' do

View file

@ -128,14 +128,7 @@ describe Post do
Post.for_visible_shareable_sql(Time.now + 1, "created_at") Post.for_visible_shareable_sql(Time.now + 1, "created_at")
end end
it 'respects the type option'
end end
describe 'includes for a stream' do
it 'inclues author profile and mentions'
it 'should include photos and root of reshares(but does not)'
end
end end
end end

View file

@ -981,10 +981,6 @@ describe User do
bob.retract(@post) bob.retract(@post)
end end
it 'performs the retraction' do
pending
end
end end
end end
end end

View file

@ -7,11 +7,6 @@ require 'spec_helper'
describe Diaspora::Relayable do describe Diaspora::Relayable do
shared_examples_for "it is relayable" do shared_examples_for "it is relayable" do
context 'validation' do
it 'ensures an valid associated parent'
it 'ensures the presence of an author'
end
context 'encryption' do context 'encryption' do
describe '#parent_author_signature' do describe '#parent_author_signature' do
it 'should sign the object if the user is the post author' do it 'should sign the object if the user is the post author' do