Merge pull request #8 from pozorvlak/story14footer

Story 14: include links in footer
This commit is contained in:
Skud
2012-09-09 13:18:55 -07:00
4 changed files with 27 additions and 4 deletions

View File

@@ -0,0 +1,7 @@
<ul>
<li><%= link_to "About", "https://github.com/Growstuff/project/wiki/About%20Growstuff" %></li>
<li><%= link_to "License", "https://github.com/Growstuff/growstuff/blob/dev/LICENSE.txt" %></li>
<li><%= link_to "Github", "https://github.com/Growstuff/" %></li>
<li><%= link_to "Mailing list", "http://lists.growstuff.org/mailman/listinfo/discuss" %></li>
<li><%= link_to "Community Guidelines", "https://github.com/Growstuff/policy/blob/master/community-guidelines.md" %></li>
</ul>

View File

@@ -17,5 +17,7 @@
<%= yield %>
<%= render :partial => "layouts/footer" %>
</body>
</html>

View File

@@ -0,0 +1,16 @@
require 'spec_helper'
describe 'layouts/application.html.erb', :type => "view" do
before(:each) do
render
end
it 'should have links in footer' do
rendered.should contain 'About'
rendered.should contain 'License'
rendered.should contain 'Github'
rendered.should contain 'Mailing list'
rendered.should contain 'Community Guidelines'
end
end

View File

@@ -6,15 +6,14 @@ describe 'home/index.html.erb', :type => "view" do
before(:each) do
view.stub(:user_signed_in).and_return(false)
view.stub(:current_user).and_return(nil)
render
end
it 'shows the homepage' do
render
rendered.should contain 'Growstuff'
end
it 'should have signup/login links' do
render
rendered.should contain 'Sign up'
rendered.should contain 'Log in'
end
@@ -33,16 +32,15 @@ describe 'home/index.html.erb', :type => "view" do
@user = User.create(:email => "growstuff@example.com", :password => "irrelevant")
@user.confirm!
sign_in @user
render
end
it 'should show username' do
render
rendered.should contain 'You are signed in as'
rendered.should contain 'growstuff@example.com'
end
it 'should show logout link' do
render
rendered.should contain 'Log out'
end