ability_test.rb revision 38dab3b63e2730b443590a53de93e085659efe25
require 'test_helper'
context 'Ontology' do
setup do
end
context 'owner' do
setup do
end
should 'be allowed: new, create' do
end
end
should 'be allowed: edit, update, destroy, permissions' do
end
end
should 'not be allowed on other: edit, update, destroy, permissions' do
end
end
end
context 'editor' do
setup do
end
should 'be allowed: edit, update' do
end
end
should 'not be allowed: destroy, permissions' do
end
end
end
end
context 'Team' do
setup do
@memberteam.users << @user
end
context 'admin' do
should 'be allowed: edit, update, destroy' do
end
end
end
context 'member' do
should 'be allowed: create, show, index' do
end
end
should 'not be allowed: edit, update, destroy (without admin on team)' do
end
end
should 'not be allowed: edit, update, destroy (without being on team)' do
end
end
end
end
context 'Comment' do
setup do
end
context 'author' do
setup do
end
should 'destroy his own comment' do
end
should 'not be allowed to destroy others comment' do
end
end
context 'admin' do
setup do
end
should 'destroy others comment' do
end
end
context 'comments ontology owner' do
setup do
end
should 'destroy others comments for his ontology' do
end
end
context 'comments ontology editor' do
setup do
end
should 'not destroy others comments for his ontology' do
end
end
end
end