use memberships correctly

This commit is contained in:
Enrique García Cota 2012-03-02 23:59:58 +01:00
parent ae18098c6d
commit db171eba22
2 changed files with 3 additions and 3 deletions

View File

@ -9,10 +9,10 @@ module Locomotive
_source.present?
end
def name
_source.account.name if logged_in?
_source.name if logged_in?
end
def email
_source.account.email if logged_in?
_source.email if logged_in?
end
def logout_path
destroy_admin_session_path

View File

@ -14,7 +14,7 @@ describe Locomotive::Liquid::Drops::CurrentUser do
@controller.stubs(:request).returns(OpenStruct.new(:url => '/subpage', :fullpath => '/subpage'))
@controller.current_site = @site
@admin = FactoryGirl.build(:admin)
@admin = FactoryGirl.build(:admin).account
end
def expect_render(template, text)