39 lines
1.2 KiB
Ruby
39 lines
1.2 KiB
Ruby
# Copyright (c) 2010-2011, Diaspora Inc. This file is
|
|
# licensed under the Affero General Public License version 3 or later. See
|
|
# the COPYRIGHT file.
|
|
require 'spec_helper'
|
|
|
|
describe GettingStartedHelper do
|
|
before do
|
|
@current_user = alice
|
|
end
|
|
|
|
def current_user
|
|
@current_user
|
|
end
|
|
|
|
describe "#has_connected_cubbies?" do
|
|
it 'returns true if the current user has connected cubbies to their account' do
|
|
@current_user.authorizations << FactoryGirl.create(:oauth_authorization)
|
|
has_connected_cubbies?.should be_true
|
|
end
|
|
|
|
it 'returns false if the current user has not connected cubbies to their account' do
|
|
has_connected_cubbies?.should be_false
|
|
end
|
|
end
|
|
|
|
describe "#has_completed_getting_started?" do
|
|
it 'returns true if the current user has completed getting started' do
|
|
@current_user.getting_started = false
|
|
@current_user.save
|
|
has_completed_getting_started?.should be_true
|
|
end
|
|
|
|
it 'returns false if the current user has not completed getting started' do
|
|
@current_user.getting_started = true
|
|
@current_user.save
|
|
has_completed_getting_started?.should be_false
|
|
end
|
|
end
|
|
end
|