Skip to content

Commit

Permalink
fix hidden feature /talks/upcoming
Browse files Browse the repository at this point in the history
  • Loading branch information
munen committed Jun 24, 2014
1 parent b3cd901 commit 1bb417e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/controllers/talks_controller.rb
Original file line number Diff line number Diff line change
@@ -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!

Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions spec/features/talks_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 1bb417e

Please sign in to comment.