We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e92b56b commit 8b3ff45Copy full SHA for 8b3ff45
2 files changed
Gemfile
@@ -28,4 +28,5 @@ group :development, :test do
28
gem 'sqlite3', '~> 1.3'
29
end
30
31
+ gem "cancan" if ENV["AUTHORIZATION_ADAPTER"] == "cancan"
32
spec/requests/authorization/cancan_spec.rb
@@ -0,0 +1,29 @@
1
+if ENV["AUTHORIZATION_ADAPTER"] == "cancan"
2
+ require 'spec_helper'
3
+
4
+ class Ability
5
+ include CanCan::Ability
6
+ def initialize(user)
7
+ can :manage, :all
8
+ end
9
10
11
+ describe "RailsAdmin CanCan Authorization" do
12
+ before(:each) do
13
+ RailsAdmin::Config.authorization_adapter = :cancan
14
15
16
+ describe "GET /admin" do
17
18
+ get rails_admin_dashboard_path
19
20
21
+ it "should respond successfully" do
22
+ response.code.should == "200"
23
24
25
26
27
+end
0 commit comments