diff --git a/app/controllers/talks_controller.rb b/app/controllers/talks_controller.rb index fd6563ec2..f8e5613a3 100644 --- a/app/controllers/talks_controller.rb +++ b/app/controllers/talks_controller.rb @@ -1,6 +1,7 @@ class TalksController < ApplicationController - before_action :set_venue, except: [:index, :popular, :live, :recent, :featured] + before_action :set_venue, except: [:index, :popular, :live, :recent, + :featured, :upcoming] before_action :set_talk, only: [:show, :edit, :update, :destroy] before_filter :authenticate_user! @@ -36,7 +37,7 @@ def recent def index if @venue - @talks = @venue.talks + @talks = @venue.talks else @talks_live = Talk.live.limit(5) @talks_featured = Talk.featured.limit(5) diff --git a/spec/features/talks_spec.rb b/spec/features/talks_spec.rb index 2a46fada1..d5590af6a 100644 --- a/spec/features/talks_spec.rb +++ b/spec/features/talks_spec.rb @@ -16,6 +16,10 @@ visit '/talks/popular' page.should have_selector(".talks-popular") end + it 'index on GET /talks/upcoming' do # upcoming + visit '/talks/upcoming' + page.should have_selector(".talks-upcoming") + end it 'index on GET /talks/live' do # live visit '/talks/live' page.should have_selector(".talks-live")