Display log in / sign up links on landing page

This commit is contained in:
Rohan Mitchell
2013-09-06 13:44:35 +10:00
parent 80bb55496b
commit 33d1948bda
2 changed files with 26 additions and 1 deletions

View File

@@ -12,6 +12,15 @@
= csrf_meta_tags
%body
- unless spree_current_user
%nav.top-bar
%ul.title-area
%li.name
%section.top-bar-section
%ul.right
%li= link_to 'Log in', spree.login_path
%li= link_to 'Sign up', spree.signup_path
.row.landing-page-row.with-bottom-border
.large-12.columns.centered
= image_tag "ofn_logo_black.png"

View File

@@ -5,6 +5,7 @@ feature %q{
I want to see the landing page
So I choose a distributor
}, js: true do
include AuthenticationWorkflow
background do
# for the link to be visible, it would also have to be in 'distributors.yml'
@@ -23,9 +24,24 @@ feature %q{
end
end
describe "account links" do
it "should display log in and sign up links when signed out" do
page.should have_link 'Log in'
page.should have_link 'Sign up'
end
it "should not display links when signed in" do
login_to_consumer_section
visit root_path
page.should_not have_link 'Log in'
page.should_not have_link 'Sign up'
end
end
describe "hub list" do
it "should display hub link" do
page.should have_link("Green Grass")
page.should have_link "Green Grass"
end
it "should link to the hub page" do