Clean up request specs
This commit is contained in:
parent
b2a5344a2d
commit
232389f4e8
6 changed files with 191 additions and 150 deletions
|
@ -11,24 +11,30 @@ describe "Users Security" do
|
|||
end
|
||||
|
||||
describe "GET /keys" do
|
||||
it { keys_path.should be_allowed_for @u1 }
|
||||
it { keys_path.should be_allowed_for :admin }
|
||||
it { keys_path.should be_allowed_for :user }
|
||||
it { keys_path.should be_denied_for :visitor }
|
||||
subject { keys_path }
|
||||
|
||||
it { should be_allowed_for @u1 }
|
||||
it { should be_allowed_for :admin }
|
||||
it { should be_allowed_for :user }
|
||||
it { should be_denied_for :visitor }
|
||||
end
|
||||
|
||||
describe "GET /profile" do
|
||||
it { profile_path.should be_allowed_for @u1 }
|
||||
it { profile_path.should be_allowed_for :admin }
|
||||
it { profile_path.should be_allowed_for :user }
|
||||
it { profile_path.should be_denied_for :visitor }
|
||||
subject { profile_path }
|
||||
|
||||
it { should be_allowed_for @u1 }
|
||||
it { should be_allowed_for :admin }
|
||||
it { should be_allowed_for :user }
|
||||
it { should be_denied_for :visitor }
|
||||
end
|
||||
|
||||
describe "GET /profile/password" do
|
||||
it { profile_password_path.should be_allowed_for @u1 }
|
||||
it { profile_password_path.should be_allowed_for :admin }
|
||||
it { profile_password_path.should be_allowed_for :user }
|
||||
it { profile_password_path.should be_denied_for :visitor }
|
||||
subject { profile_password_path }
|
||||
|
||||
it { should be_allowed_for @u1 }
|
||||
it { should be_allowed_for :admin }
|
||||
it { should be_allowed_for :user }
|
||||
it { should be_denied_for :visitor }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue