added has_connected_cubbies?

This commit is contained in:
danielgrippi 2011-08-03 13:14:33 -07:00
parent 120cf9835b
commit e589dd88b2
3 changed files with 3 additions and 5 deletions

View file

@ -32,6 +32,7 @@ module UsersHelper
# @return [Boolean] The user has connected to cubbi.es
def has_connected_cubbies?
current_user.authorizations.size > 0
end
# @return [Boolean] The user has completed all steps in getting started

View file

@ -143,7 +143,7 @@
%br
%br
%li.cubbies
%li.cubbies{:class => ("completed" if has_connected_cubbies?)}
.getting_started_number
%h3
= @step += 1

View file

@ -79,11 +79,8 @@ describe UsersHelper do
end
describe "#has_connected_cubbies?" do
before do
pending
end
it 'returns true if the current user has connected cubbies to their account' do
@current_user.authorizations << Factory(:oauth_authorization)
has_connected_cubbies?.should be_true
end