Adapts the CommentsController to the new permissions system

This commit is contained in:
kikito
2015-08-10 15:40:23 +02:00
parent ce27a6f2ea
commit 84d848df7e
3 changed files with 19 additions and 12 deletions

View File

@@ -24,6 +24,9 @@ describe Ability do
it { should be_able_to(:show, user) }
it { should be_able_to(:edit, user) }
it { should be_able_to(:create, Comment) }
it { should be_able_to(:vote, Comment) }
describe "other users" do
let(:other_user) { create(:user) }
it { should_not be_able_to(:show, other_user) }