Commit e3d7ce2cc482a730b2dc63ca09057b22a960b998
1 parent
0a94640e
Exists in
master
and in
4 other branches
Tests are fixed now
Showing
6 changed files
with
19 additions
and
23 deletions
Show diff stats
app/assets/stylesheets/sections/events.scss
app/controllers/projects_controller.rb
... | ... | @@ -101,7 +101,7 @@ class ProjectsController < ProjectResourceController |
101 | 101 | return access_denied! unless can?(current_user, :remove_project, project) |
102 | 102 | |
103 | 103 | # Delete team first in order to prevent multiple gitolite calls |
104 | - project.truncate_team | |
104 | + project.team.truncate | |
105 | 105 | |
106 | 106 | project.destroy |
107 | 107 | ... | ... |
app/views/admin/projects/_form.html.haml
... | ... | @@ -11,18 +11,18 @@ |
11 | 11 | .input |
12 | 12 | = f.text_field :name, placeholder: "Example Project", class: "xxlarge" |
13 | 13 | |
14 | - %fieldset.adv_settings | |
15 | - %legend Advanced settings: | |
16 | - .clearfix | |
17 | - = f.label :path do | |
18 | - Path | |
19 | - .input | |
20 | - = text_field_tag :ppath, @project.path_to_repo, class: "xlarge", disabled: true | |
14 | + - if project.repo_exists? | |
15 | + %fieldset.adv_settings | |
16 | + %legend Advanced settings: | |
17 | + .clearfix | |
18 | + = f.label :path do | |
19 | + Path | |
20 | + .input | |
21 | + = text_field_tag :ppath, @project.repository.path_to_repo, class: "xlarge", disabled: true | |
21 | 22 | |
22 | - - if project.repo_exists? | |
23 | 23 | .clearfix |
24 | 24 | = f.label :default_branch, "Default Branch" |
25 | - .input= f.select(:default_branch, repository.heads.map(&:name), {}, style: "width:210px;") | |
25 | + .input= f.select(:default_branch, @project.repository.heads.map(&:name), {}, style: "width:210px;") | |
26 | 26 | |
27 | 27 | %fieldset.adv_settings |
28 | 28 | %legend Features: | ... | ... |
app/views/events/event/_note.html.haml
spec/models/merge_request_spec.rb
... | ... | @@ -40,7 +40,7 @@ describe MergeRequest do |
40 | 40 | let!(:merge_request) { create(:merge_request) } |
41 | 41 | |
42 | 42 | before do |
43 | - merge_request.stub(:commits) { [merge_request.project.commit] } | |
43 | + merge_request.stub(:commits) { [merge_request.project.repository.commit] } | |
44 | 44 | create(:note, commit_id: merge_request.commits.first.id, noteable_type: 'Commit') |
45 | 45 | create(:note, noteable: merge_request) |
46 | 46 | end | ... | ... |
spec/models/protected_branch_spec.rb
... | ... | @@ -39,13 +39,4 @@ describe ProtectedBranch do |
39 | 39 | branch.destroy |
40 | 40 | end |
41 | 41 | end |
42 | - | |
43 | - describe '#commit' do | |
44 | - let(:branch) { create(:protected_branch) } | |
45 | - | |
46 | - it 'commits itself to its project' do | |
47 | - branch.project.repository.should_receive(:commit).with(branch.name) | |
48 | - branch.commit | |
49 | - end | |
50 | - end | |
51 | 42 | end | ... | ... |