Comments cucumber. More refactoring. Cucumber -> branches, tags
This commit is contained in:
parent
1281c122c7
commit
9844ddd43f
16 changed files with 80 additions and 192 deletions
34
spec/requests/security/profile_access_spec.rb
Normal file
34
spec/requests/security/profile_access_spec.rb
Normal file
|
@ -0,0 +1,34 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "Users Security" do
|
||||
describe "Project" do
|
||||
before do
|
||||
@u1 = Factory :user
|
||||
end
|
||||
|
||||
describe "GET /login" do
|
||||
it { new_user_session_path.should_not be_404_for :visitor }
|
||||
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 }
|
||||
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 }
|
||||
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 }
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue