add some tests to prove the nav is working (issue #30)
did
committed Apr 17, 2013
commit 56aa65b159af5a1db269268096442822c3d0b781
Showing 2
changed files with
22 additions
and 1 deletions
spec/fixtures/default/app/views/pages/index.liquid.haml
+1
-1
| @@ | @@ -30,7 +30,7 @@ title: Home page |
| %body | |
| .container | |
| #menu | |
| - | #nav |
| + | %ul#nav |
| %li#home{ :class => "{% if page.fullpath == 'index' %}on{% endif %} link" } | |
| %a{ :href => '/' } Home | |
| {% nav site, no_wrapper: true, exclude: 'events' %} | |
spec/integration/server/basic_spec.rb
+21
-0
| @@ | @@ -50,4 +50,25 @@ describe Locomotive::Wagon::Server do |
| last_response.body.should =~ /<li>A song template<\/li>/ | |
| end | |
| + | describe 'nav' do |
| + | |
| + | subject { get '/all'; last_response.body } |
| + | |
| + | it { should match(/<li id="about-us-link" class="link first "><a href="\/about-us" >About Us <\/a><\/li>/)} |
| + | |
| + | it { should match(/<li id="music-link" class="link "><a href="\/music" >Music <\/a><\/li>/)} |
| + | |
| + | it { should match(/<li id="store-link" class="link "><a href="\/store" >Store <\/a><\/li>/)} |
| + | |
| + | it { should match(/<li id="contact-link" class="link last "><a href="\/contact" >Contact Us <\/a><\/li>/)} |
| + | |
| + | it { should_not match(/<li id="events-link" class="link "><a href="\/events" >Events <\/a><\/li>/)} |
| + | |
| + | end |
| + | |
| + | # it 'renders the nav' do |
| + | # get '/' |
| + | # last_response.body.should =~ /Home page/ |
| + | # end |
| + | |
| end | |
| \ No newline at end of file | |