41 lines
1.3 KiB
Ruby
41 lines
1.3 KiB
Ruby
# Copyright 2010 Diaspora Inc.
|
|
#
|
|
# This file is part of Diaspora.
|
|
#
|
|
# Diaspora is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Diaspora is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with Diaspora. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
|
|
|
|
require File.dirname(__FILE__) + '/../spec_helper'
|
|
|
|
include RequestsHelper
|
|
|
|
describe RequestsHelper do
|
|
|
|
before do
|
|
|
|
stub_success("tom@tom.joindiaspora.com")
|
|
stub_success("evan@status.net")
|
|
@tom = Redfinger.finger('tom@tom.joindiaspora.com')
|
|
@evan = Redfinger.finger('evan@status.net')
|
|
end
|
|
|
|
describe "profile" do
|
|
it 'should detect how to subscribe to a diaspora or webfinger profile' do
|
|
subscription_mode(@tom).should == :friend
|
|
subscription_mode(@evan).should == :none
|
|
end
|
|
end
|
|
end
|