projects link added. security specs added
This commit is contained in:
parent
15c4655527
commit
00d7bfda95
7 changed files with 55 additions and 31 deletions
BIN
app/assets/images/Storage-UI.PNG
Normal file
BIN
app/assets/images/Storage-UI.PNG
Normal file
Binary file not shown.
After Width: | Height: | Size: 737 B |
|
@ -5,6 +5,12 @@
|
|||
- @keys.each do |key|
|
||||
= render(:partial => 'show', :locals => {:key => key})
|
||||
|
||||
- if @keys.blank?
|
||||
.notice_holder
|
||||
%li Deploy Keys do not exist yet.
|
||||
- if can? current_user, :admin_project, @project
|
||||
%li You can add a new one by clicking on plus icon
|
||||
|
||||
:javascript
|
||||
$('.delete-key').live('ajax:success', function() {
|
||||
$(this).closest('.update-item').fadeOut(); });
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
%div.main_links
|
||||
= link_to root_path, :class => "home", :title => "Home" do
|
||||
= image_tag "Home-UI.PNG"
|
||||
= link_to :back, :title => "Back" do
|
||||
= image_tag "Arrow-Left-UI.PNG"
|
||||
= link_to projects_path, :title => "Projects" do
|
||||
= image_tag "Storage-UI.PNG"
|
||||
|
||||
- if project_layout
|
||||
.project_name
|
||||
|
|
|
@ -29,7 +29,7 @@ describe "Projects", "DeployKeys" do
|
|||
end
|
||||
end
|
||||
|
||||
describe "New key", :js => true do
|
||||
describe "New key" do
|
||||
before do
|
||||
visit project_deploy_keys_path(project)
|
||||
click_link "New Deploy Key"
|
||||
|
|
|
@ -140,5 +140,50 @@ describe "Projects" do
|
|||
it { project_merge_requests_path(@project).should be_denied_for :user }
|
||||
it { project_merge_requests_path(@project).should be_denied_for :visitor }
|
||||
end
|
||||
|
||||
describe "GET /project_code/repository" do
|
||||
it { project_repository_path(@project).should be_allowed_for @u1 }
|
||||
it { project_repository_path(@project).should be_allowed_for @u3 }
|
||||
it { project_repository_path(@project).should be_denied_for :admin }
|
||||
it { project_repository_path(@project).should be_denied_for @u2 }
|
||||
it { project_repository_path(@project).should be_denied_for :user }
|
||||
it { project_repository_path(@project).should be_denied_for :visitor }
|
||||
end
|
||||
|
||||
describe "GET /project_code/repository/branches" do
|
||||
it { branches_project_repository_path(@project).should be_allowed_for @u1 }
|
||||
it { branches_project_repository_path(@project).should be_allowed_for @u3 }
|
||||
it { branches_project_repository_path(@project).should be_denied_for :admin }
|
||||
it { branches_project_repository_path(@project).should be_denied_for @u2 }
|
||||
it { branches_project_repository_path(@project).should be_denied_for :user }
|
||||
it { branches_project_repository_path(@project).should be_denied_for :visitor }
|
||||
end
|
||||
|
||||
describe "GET /project_code/repository/tags" do
|
||||
it { tags_project_repository_path(@project).should be_allowed_for @u1 }
|
||||
it { tags_project_repository_path(@project).should be_allowed_for @u3 }
|
||||
it { tags_project_repository_path(@project).should be_denied_for :admin }
|
||||
it { tags_project_repository_path(@project).should be_denied_for @u2 }
|
||||
it { tags_project_repository_path(@project).should be_denied_for :user }
|
||||
it { tags_project_repository_path(@project).should be_denied_for :visitor }
|
||||
end
|
||||
|
||||
describe "GET /project_code/hooks" do
|
||||
it { project_hooks_path(@project).should be_allowed_for @u1 }
|
||||
it { project_hooks_path(@project).should be_allowed_for @u3 }
|
||||
it { project_hooks_path(@project).should be_denied_for :admin }
|
||||
it { project_hooks_path(@project).should be_denied_for @u2 }
|
||||
it { project_hooks_path(@project).should be_denied_for :user }
|
||||
it { project_hooks_path(@project).should be_denied_for :visitor }
|
||||
end
|
||||
|
||||
describe "GET /project_code/files" do
|
||||
it { files_project_path(@project).should be_allowed_for @u1 }
|
||||
it { files_project_path(@project).should be_allowed_for @u3 }
|
||||
it { files_project_path(@project).should be_denied_for :admin }
|
||||
it { files_project_path(@project).should be_denied_for @u2 }
|
||||
it { files_project_path(@project).should be_denied_for :user }
|
||||
it { files_project_path(@project).should be_denied_for :visitor }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe "Tags" do
|
||||
before { login_as :user }
|
||||
|
||||
# describe "GET 'tags/index'" do
|
||||
# it "should be successful" do
|
||||
# get 'tags/index'
|
||||
# response.should be_success
|
||||
# end
|
||||
# end
|
||||
|
||||
describe "GET '/tags.json'" do
|
||||
before do
|
||||
@project = Factory :project
|
||||
@project.add_access(@user, :read)
|
||||
@project.tag_list = 'demo1'
|
||||
@project.save
|
||||
visit '/tags.json'
|
||||
end
|
||||
|
||||
it "should contains tags" do
|
||||
page.should have_content('demo1')
|
||||
end
|
||||
end
|
||||
|
||||
end
|
|
@ -18,7 +18,7 @@ describe "TeamMembers" do
|
|||
end
|
||||
end
|
||||
|
||||
describe "New Team member", :js => true do
|
||||
describe "New Team member" do
|
||||
before do
|
||||
@user_1 = Factory :user
|
||||
visit team_project_path(@project)
|
||||
|
|
Loading…
Reference in a new issue