spec/lib/shamu/security/roles_spec.rb in shamu-0.0.19 vs spec/lib/shamu/security/roles_spec.rb in shamu-0.0.20
- old
+ new
@@ -24,10 +24,14 @@
role :manager, inherits: :user
role :user
end
end
+ it "returns all roles for :all" do
+ expect( klass.expand_roles( :all ) ).to eq [ :admin, :manager, :user ]
+ end
+
it "includes base roles" do
expect( klass.expand_roles( :user ) ).to include :user
end
it "excludes unknown roles" do
@@ -41,6 +45,6 @@
it "includes inherited inherited roles" do
expect( klass.expand_roles( :admin ) ).to include :manager
expect( klass.expand_roles( :admin ) ).to include :user
end
end
-end
\ No newline at end of file
+end