added has_connected_cubbies?
This commit is contained in:
parent
120cf9835b
commit
e589dd88b2
3 changed files with 3 additions and 5 deletions
|
|
@ -32,6 +32,7 @@ module UsersHelper
|
||||||
|
|
||||||
# @return [Boolean] The user has connected to cubbi.es
|
# @return [Boolean] The user has connected to cubbi.es
|
||||||
def has_connected_cubbies?
|
def has_connected_cubbies?
|
||||||
|
current_user.authorizations.size > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
# @return [Boolean] The user has completed all steps in getting started
|
# @return [Boolean] The user has completed all steps in getting started
|
||||||
|
|
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
%br
|
%br
|
||||||
%br
|
%br
|
||||||
|
|
||||||
%li.cubbies
|
%li.cubbies{:class => ("completed" if has_connected_cubbies?)}
|
||||||
.getting_started_number
|
.getting_started_number
|
||||||
%h3
|
%h3
|
||||||
= @step += 1
|
= @step += 1
|
||||||
|
|
|
||||||
|
|
@ -79,11 +79,8 @@ describe UsersHelper do
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "#has_connected_cubbies?" do
|
describe "#has_connected_cubbies?" do
|
||||||
before do
|
|
||||||
pending
|
|
||||||
end
|
|
||||||
|
|
||||||
it 'returns true if the current user has connected cubbies to their account' do
|
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
|
has_connected_cubbies?.should be_true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue