gitlab-org--gitlab-foss/spec/requests/security/profile_access_spec.rb

41 lines
961 B
Ruby
Raw Normal View History

2011-10-08 21:36:38 +00:00
require 'spec_helper'
describe "Users Security" do
describe "Project" do
before do
2011-10-08 21:36:38 +00:00
@u1 = Factory :user
end
describe "GET /login" do
2011-10-17 10:39:03 +00:00
it { new_user_session_path.should_not be_404_for :visitor }
2011-10-08 21:36:38 +00:00
end
describe "GET /keys" do
2012-08-25 17:43:55 +00:00
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 }
2011-10-08 21:36:38 +00:00
end
describe "GET /profile" do
2012-08-25 17:43:55 +00:00
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 }
2011-10-08 21:36:38 +00:00
end
describe "GET /profile/password" do
2012-08-25 17:43:55 +00:00
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 }
2011-10-08 21:36:38 +00:00
end
end
end