Skip to content
Extraits de code Groupes Projets
Valider 72cefc62 rédigé par Stephen Caudill's avatar Stephen Caudill
Parcourir les fichiers

Move relationship_flow spec to its helper spec

parent 8c6dff35
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# Copyright (c) 2010, Diaspora Inc. This file is
# licensed under the Affero General Public License version 3. See
# the COPYRIGHT file.
require 'spec_helper'
describe RequestsController do
include RequestsHelper
render_views
before do
@user = Factory.create :user
stub_success("tom@tom.joindiaspora.com")
@tom = Redfinger.finger('tom@tom.joindiaspora.com')
sign_in :user, @user
stub!(:current_user).and_return @user
end
it 'should return the correct tag and url for a given address' do
relationship_flow('tom@tom.joindiaspora.com')[:friend].receive_url.include?("receive/user").should == true
end
end
......@@ -7,7 +7,6 @@ require 'spec_helper'
describe RequestsHelper do
before do
stub_success("tom@tom.joindiaspora.com")
stub_success("evan@status.net")
@tom = Redfinger.finger('tom@tom.joindiaspora.com')
......@@ -20,4 +19,16 @@ describe RequestsHelper do
subscription_mode(@evan).should == :none
end
end
describe "#relationship_flow" do
let(:tom){ Factory(:user, :email => 'tom@tom.joindiaspora.com') }
before do
stub!(:current_user).and_return(tom)
end
it 'should return the correct tag and url for a given address' do
relationship_flow('tom@tom.joindiaspora.com')[:friend].receive_url.should include("receive/user")
end
end
end
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter