Permalink
Browse files

Customize home action to display placeholder

  • Loading branch information...
avdgaag committed Mar 24, 2015
1 parent 4640848 commit bb301c3ffdef80a6a79dcc6808cc6bd67531752e
@@ -5,4 +5,4 @@
#
# This route will look for `Web::Controllers::Home::Index` action in `apps/web/controllers/home/index.rb`.
# Please, uncomment the following line to have a working example.
# get '/', to: 'home#index'
get '/', to: 'home#index'
@@ -1,9 +1,13 @@
<!doctype HTML>
<html>
<!doctype html>
<html lang="en">
<head>
<title>Web</title>
<meta charset="utf-8">
<title>Lotus example blog</title>
</head>
<body>
<%= yield %>
<div id="page">
<h1><a href="/" rel="home">Lotus example blog</a></h1>
<%= yield %>
</div>
</body>
</html>
@@ -1,2 +1,3 @@
<h1>Welcome to Lotus!</h1>
<h3>This template is rendered by <code>Web::Views::Home::Index</code> and it's available at: <code>apps/web/templates/home/index.html.erb</code></h3>
<h2>All articles</h2>
<p class="placeholder">There are no articles yet.</p>
@@ -0,0 +1,13 @@
require_relative '../../features_helper'
describe 'Homepage' do
it 'links to the home page' do
visit '/'
assert page.has_link?('a', href: '/')
end
it 'shows a placeholder when there are no articles yet' do
visit '/'
assert page.has_css?('.placeholder', text: 'There are no articles yet.')
end
end

0 comments on commit bb301c3

Please sign in to comment.