Sha256: a1442159512cd8d797b7918bd031bcb9146ec4cdd48e775d0319cce37cfcadcc
Contents?: true
Size: 596 Bytes
Versions: 3
Compression:
Stored size: 596 Bytes
Contents
require 'spec_helper' describe Hydra::RoleManagement::UserRoles do subject do User.create!(email: 'fred@example.com', password: 'password') end it "should have admin?" do subject.should_not be_admin end it "should have roles" do subject.roles.should == [] subject.roles << Role.create!(name: 'librarian') subject.roles.first.name.should == 'librarian' end it "should have groups" do subject.roles.should == [] subject.roles << Role.create!(name: 'librarian') subject.save! subject.groups.should include('registered', 'librarian') end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
hydra-role-management-0.1.0 | spec/lib/user_roles_spec.rb |
hydra-role-management-0.0.2 | spec/lib/user_roles_spec.rb |
hydra-role-management-0.0.1 | spec/lib/user_roles_spec.rb |