remove unnecesary stuff from specs
This commit is contained in:
parent
99abc22403
commit
be2db47f02
8 changed files with 3 additions and 40 deletions
|
|
@ -52,15 +52,10 @@ describe RegistrationsController do
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
describe "#create" do
|
||||
context "with valid parameters" do
|
||||
before do
|
||||
AppConfig.settings.enable_registrations = true
|
||||
end
|
||||
|
||||
before do
|
||||
user = FactoryGirl.build(:user)
|
||||
User.stub!(:build).and_return(user)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -17,8 +17,6 @@ describe ServicesController do
|
|||
|
||||
before do
|
||||
@user = alice
|
||||
@aspect = @user.aspects.first
|
||||
|
||||
sign_in :user, @user
|
||||
@controller.stub!(:current_user).and_return(@user)
|
||||
mock_access_token.stub!(:token => "12345", :secret => "56789")
|
||||
|
|
@ -106,5 +104,4 @@ describe ServicesController do
|
|||
}.should change(@user.services, :count).by(-1)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ require 'spec_helper'
|
|||
describe StatusMessagesController do
|
||||
before do
|
||||
@aspect1 = alice.aspects.first
|
||||
@aspect2 = bob.aspects.first
|
||||
|
||||
request.env["HTTP_REFERER"] = ""
|
||||
sign_in :user, alice
|
||||
|
|
@ -55,8 +54,7 @@ describe StatusMessagesController do
|
|||
|
||||
describe '#new' do
|
||||
it 'succeeds' do
|
||||
get :new,
|
||||
:person_id => bob.person.id
|
||||
get :new, :person_id => bob.person.id
|
||||
response.should be_success
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ require 'spec_helper'
|
|||
describe UsersController do
|
||||
before do
|
||||
@user = alice
|
||||
@aspect = @user.aspects.first
|
||||
@aspect1 = @user.aspects.create(:name => "super!!")
|
||||
sign_in :user, @user
|
||||
@controller.stub(:current_user).and_return(@user)
|
||||
end
|
||||
|
|
@ -60,6 +58,7 @@ describe UsersController do
|
|||
get :public, :username => @user.username
|
||||
response.should be_redirect
|
||||
end
|
||||
|
||||
it 'redirects to a profile page if mobile is requested' do
|
||||
get :public, :username => @user.username, :format => :mobile
|
||||
response.should be_redirect
|
||||
|
|
@ -210,7 +209,6 @@ describe UsersController do
|
|||
Resque.should_receive(:enqueue).with(Jobs::DeleteAccount, anything)
|
||||
delete :destroy, :user => { :current_password => "bluepin7" }
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
describe '#confirm_email' do
|
||||
|
|
@ -252,4 +250,3 @@ describe UsersController do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -5,18 +5,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe LayoutHelper do
|
||||
include ApplicationHelper
|
||||
before do
|
||||
@user = alice
|
||||
end
|
||||
|
||||
describe "#page_title" do
|
||||
before do
|
||||
def current_user
|
||||
@current_user
|
||||
end
|
||||
end
|
||||
|
||||
context "passed blank text" do
|
||||
it "returns Diaspora*" do
|
||||
page_title.should == pod_name
|
||||
|
|
@ -30,4 +19,4 @@ describe LayoutHelper do
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,12 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Reshare do
|
||||
include ActionView::Helpers::UrlHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
def controller
|
||||
mock()
|
||||
end
|
||||
|
||||
|
||||
it 'has a valid Factory' do
|
||||
FactoryGirl.build(:reshare).should be_valid
|
||||
|
|
|
|||
|
|
@ -5,12 +5,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe StatusMessage do
|
||||
include ActionView::Helpers::UrlHelper
|
||||
include PeopleHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
def controller
|
||||
mock()
|
||||
end
|
||||
|
||||
before do
|
||||
@user = alice
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@ require 'spec_helper'
|
|||
describe Diaspora::Taggable do
|
||||
shared_examples_for "it is taggable" do
|
||||
include ActionView::Helpers::UrlHelper
|
||||
include Rails.application.routes.url_helpers
|
||||
def controller
|
||||
end
|
||||
|
||||
def tag_link(s)
|
||||
link_to "##{s}", "/tags/#{s}", :class => 'tag'
|
||||
|
|
|
|||
Loading…
Reference in a new issue