Permalink
Browse files

allow moderators to see upcoming episodes in index page

  • Loading branch information...
ryanb committed Jul 29, 2011
1 parent f9a00bb commit fbe42df35542e43692255549f2259525e27cdf3f
Showing with 2 additions and 1 deletion.
  1. +1 −1 app/models/ability.rb
  2. +1 −0 spec/models/ability_spec.rb
View
@@ -20,7 +20,7 @@ def initialize(user)
end
if user.moderator?
- can :show, :episodes
+ can :read, :episodes
can :update, :episodes, :notes
can [:update, :destroy, :index], :comments
can :ban, :users
@@ -116,6 +116,7 @@
end
it "can view episodes which are not yet published" do
+ @ability.should be_able_to(:index, Factory.build(:episode, :published_at => 2.days.from_now))
@ability.should be_able_to(:show, Factory.build(:episode, :published_at => 2.days.from_now))
end

0 comments on commit fbe42df

Please sign in to comment.