From f1d669a024bcd0875af497275ea981c032d0bb0b Mon Sep 17 00:00:00 2001 From: Sarah Mei <sarahmei@gmail.com> Date: Sun, 6 Nov 2011 21:29:22 -0800 Subject: [PATCH] Delete all pending specs except stuff we actually want to fix in the short term. Add more useful comments to those. --- spec/controllers/posts_controller_spec.rb | 8 ----- spec/controllers/services_controller_spec.rb | 7 ----- spec/integration/dispatching_spec.rb | 30 ++++++++----------- spec/lib/diaspora/redis_cache_spec.rb | 2 -- spec/lib/hydra_wrapper_spec.rb | 11 ------- .../lib/postzord/receiver/local_batch_spec.rb | 11 ------- spec/lib/postzord/receiver/public_spec.rb | 2 -- spec/lib/salmon/base64_spec.rb | 11 ------- spec/lib/statistics_spec.rb | 8 ----- spec/lib/stream/tag_spec.rb | 2 +- spec/models/invitation_spec.rb | 12 -------- spec/models/jobs/receive_local_batch_spec.rb | 18 ----------- spec/models/o_embed_cache_spec.rb | 5 ---- spec/models/photo_spec.rb | 9 ------ spec/models/post_spec.rb | 7 ----- spec/models/user_spec.rb | 4 --- spec/shared_behaviors/relayable.rb | 5 ---- 17 files changed, 14 insertions(+), 138 deletions(-) delete mode 100644 spec/lib/salmon/base64_spec.rb delete mode 100644 spec/models/jobs/receive_local_batch_spec.rb delete mode 100644 spec/models/o_embed_cache_spec.rb diff --git a/spec/controllers/posts_controller_spec.rb b/spec/controllers/posts_controller_spec.rb index b5b9de19e8..ffef6486a8 100644 --- a/spec/controllers/posts_controller_spec.rb +++ b/spec/controllers/posts_controller_spec.rb @@ -99,14 +99,6 @@ describe PostsController do 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 status = alice.post(:status_message, :text => "hello", :public => false, :to => 'all') get :show, :id => status.id diff --git a/spec/controllers/services_controller_spec.rb b/spec/controllers/services_controller_spec.rb index b60321f1ab..f2c3712760 100644 --- a/spec/controllers/services_controller_spec.rb +++ b/spec/controllers/services_controller_spec.rb @@ -155,13 +155,6 @@ describe ServicesController do @invite_params = {:provider => 'facebook', :uid => @uid, :aspect_id => @user.aspects.first.id} 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 put :inviter, @invite_params response.location.should match(/https:\/\/www\.facebook\.com\/\?compose=1&id=.*&subject=.*&message=.*&sk=messages/) diff --git a/spec/integration/dispatching_spec.rb b/spec/integration/dispatching_spec.rb index e9782d5445..a4cd2ee062 100644 --- a/spec/integration/dispatching_spec.rb +++ b/spec/integration/dispatching_spec.rb @@ -1,25 +1,21 @@ require 'spec_helper' -describe 'dispatching' do - before do - pending "TEST POLUTION HERE :(" - @luke, @leia, @raph = set_up_friends - end - - 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) +describe "Dispatching" do + context "a comment retraction on a public post" do + it "should trigger a private dispatch" do + pending "Running this causes test failures in the relayable specs. If you can figure out why, you'll be OUR HERO. <3 <3" + luke, leia, raph = set_up_friends + # 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) - Postzord::Dispatcher::Private.should_receive(:new).and_return(stub(:post => true)) - #luke now retracts his comment + # Luke now retracts his comment + Postzord::Dispatcher::Public.should_not_receive(:new) + Postzord::Dispatcher::Private.should_receive(:new).and_return(stub(:post => true)) fantasy_resque do - @luke.retract(c) + luke.retract(c) end - end + end end - end diff --git a/spec/lib/diaspora/redis_cache_spec.rb b/spec/lib/diaspora/redis_cache_spec.rb index 880d70753b..302ef3a817 100644 --- a/spec/lib/diaspora/redis_cache_spec.rb +++ b/spec/lib/diaspora/redis_cache_spec.rb @@ -104,8 +104,6 @@ describe RedisCache do @cache.populate! end - - it 'adds the post from the hash to the cache' end describe "#trim!" do diff --git a/spec/lib/hydra_wrapper_spec.rb b/spec/lib/hydra_wrapper_spec.rb index e4359eb5b2..1218642e30 100644 --- a/spec/lib/hydra_wrapper_spec.rb +++ b/spec/lib/hydra_wrapper_spec.rb @@ -74,17 +74,6 @@ describe HydraWrapper do 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 it 'does not execute unless response has a 3xx code' do resp = stub(:code => 200) diff --git a/spec/lib/postzord/receiver/local_batch_spec.rb b/spec/lib/postzord/receiver/local_batch_spec.rb index 1a2cec007c..3ff3078046 100644 --- a/spec/lib/postzord/receiver/local_batch_spec.rb +++ b/spec/lib/postzord/receiver/local_batch_spec.rb @@ -23,12 +23,6 @@ describe Postzord::Receiver::LocalBatch do receiver.receive! end - it 'sockets to users' do - pending 'not currently socketing' - receiver.should_receive(:socket_to_users) - receiver.receive! - end - it 'notifies mentioned users' do receiver.should_receive(:notify_mentioned_users) receiver.receive! @@ -100,11 +94,6 @@ describe Postzord::Receiver::LocalBatch do receiver.perform! 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 receiver.should_not_receive(:notify_mentioned_users) receiver.should_not_receive(:create_share_visibilities) diff --git a/spec/lib/postzord/receiver/public_spec.rb b/spec/lib/postzord/receiver/public_spec.rb index 9fad05edcd..5d3ee3fff0 100644 --- a/spec/lib/postzord/receiver/public_spec.rb +++ b/spec/lib/postzord/receiver/public_spec.rb @@ -99,8 +99,6 @@ describe Postzord::Receiver::Public do @receiver = Postzord::Receiver::Public.new(xml) end - it 'raises if parent object does not exist' - it 'receives only for the parent author if he is local to the pod' do comment = stub.as_null_object @receiver.instance_variable_set(:@object, comment) diff --git a/spec/lib/salmon/base64_spec.rb b/spec/lib/salmon/base64_spec.rb deleted file mode 100644 index 1fd6bcaf8c..0000000000 --- a/spec/lib/salmon/base64_spec.rb +++ /dev/null @@ -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 diff --git a/spec/lib/statistics_spec.rb b/spec/lib/statistics_spec.rb index 3ee6c6cd6e..6e775e6366 100644 --- a/spec/lib/statistics_spec.rb +++ b/spec/lib/statistics_spec.rb @@ -129,14 +129,6 @@ describe Statistics do end end 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 bob.sign_in_count = 1 bob.post(:status_message, :text => "here is a message") diff --git a/spec/lib/stream/tag_spec.rb b/spec/lib/stream/tag_spec.rb index 6c33c2cba2..c4f90cb8bd 100644 --- a/spec/lib/stream/tag_spec.rb +++ b/spec/lib/stream/tag_spec.rb @@ -34,7 +34,7 @@ describe Stream::Tag do end 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') Factory(:comment, :text => "#what", :post => other_post) @stream.posts.should == [other_post] diff --git a/spec/models/invitation_spec.rb b/spec/models/invitation_spec.rb index 8837700f7d..4681ba9c59 100644 --- a/spec/models/invitation_spec.rb +++ b/spec/models/invitation_spec.rb @@ -74,18 +74,6 @@ describe Invitation do invite.send! }.should_not change(User, :count) 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 describe '.batch_invite' do diff --git a/spec/models/jobs/receive_local_batch_spec.rb b/spec/models/jobs/receive_local_batch_spec.rb deleted file mode 100644 index 9117720bae..0000000000 --- a/spec/models/jobs/receive_local_batch_spec.rb +++ /dev/null @@ -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 diff --git a/spec/models/o_embed_cache_spec.rb b/spec/models/o_embed_cache_spec.rb deleted file mode 100644 index e544179624..0000000000 --- a/spec/models/o_embed_cache_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe OEmbedCache do - pending "add some examples to (or delete) #{__FILE__}" -end diff --git a/spec/models/photo_spec.rb b/spec/models/photo_spec.rb index bf439cff47..d3c133fe09 100644 --- a/spec/models/photo_spec.rb +++ b/spec/models/photo_spec.rb @@ -91,16 +91,7 @@ describe Photo do Photo.diaspora_initialize( :author => @user.person, :image_url => url) 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 describe '#update_remote_path' do diff --git a/spec/models/post_spec.rb b/spec/models/post_spec.rb index 55f9b34302..fa546987ed 100644 --- a/spec/models/post_spec.rb +++ b/spec/models/post_spec.rb @@ -128,14 +128,7 @@ describe Post do Post.for_visible_shareable_sql(Time.now + 1, "created_at") end - it 'respects the type option' 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 diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index b8316de163..e89de4100b 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -981,10 +981,6 @@ describe User do bob.retract(@post) end - - it 'performs the retraction' do - pending - end end end end diff --git a/spec/shared_behaviors/relayable.rb b/spec/shared_behaviors/relayable.rb index fff2d15cc5..7bf27b68d9 100644 --- a/spec/shared_behaviors/relayable.rb +++ b/spec/shared_behaviors/relayable.rb @@ -7,11 +7,6 @@ require 'spec_helper' describe Diaspora::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 describe '#parent_author_signature' do it 'should sign the object if the user is the post author' do -- GitLab