mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-27 19:23:59 -04:00
Merge pull request #8 from pozorvlak/story14footer
Story 14: include links in footer
This commit is contained in:
7
app/views/layouts/_footer.html.erb
Normal file
7
app/views/layouts/_footer.html.erb
Normal 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>
|
||||
@@ -17,5 +17,7 @@
|
||||
|
||||
<%= yield %>
|
||||
|
||||
<%= render :partial => "layouts/footer" %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
16
spec/view/application_spec.rb
Normal file
16
spec/view/application_spec.rb
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user