Sha256: b5bf9b820022005ee1aa4c4962be501ae5e0231109d3661db01e9e97d62e1309
Contents?: true
Size: 727 Bytes
Versions: 8
Compression:
Stored size: 727 Bytes
Contents
require 'spec_helper' describe Ability do describe "as a course admin user" do subject { Ability.new(Factory.build(:user_course_admin), 'Admin') } it { should be_able_to(:manage, School) } end describe "as a learner user" do subject { Ability.new(Factory.build(:user_learner)) } it { should be_able_to(:create, School) } it { should be_able_to(:update, School) } it { should be_able_to(:index, School) } end describe "as an unregistered user" do subject { Ability.new(User.new) } it { should be_able_to(:create, School) } it { should be_able_to(:update, School) } it { should be_able_to(:index, School) } it { should be_able_to(:create, User) } end end
Version data entries
8 entries across 8 versions & 1 rubygems