Commit ed82ab4117cbfc32767fe1f5f179cf3447cbaabb

Authored by Dmitriy Zaporozhets
1 parent 7c91055e

Remove some deprecations and fir project helper specs

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
app/helpers/projects_helper.rb
@@ -82,7 +82,7 @@ module ProjectsHelper @@ -82,7 +82,7 @@ module ProjectsHelper
82 end 82 end
83 83
84 def project_active_milestones 84 def project_active_milestones
85 - @project.milestones.active.order("due_date, title ASC").all 85 + @project.milestones.active.order("due_date, title ASC")
86 end 86 end
87 87
88 def project_issues_trackers(current_tracker = nil) 88 def project_issues_trackers(current_tracker = nil)
app/views/projects/notes/_note.html.haml
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 %i.icon-edit 10 %i.icon-edit
11 Edit 11 Edit
12 &nbsp; 12 &nbsp;
13 - = link_to project_note_path(@project, note), title: "Remove comment", method: :delete, confirm: 'Are you sure you want to remove this comment?', remote: true, class: "danger js-note-delete" do 13 + = link_to project_note_path(@project, note), title: "Remove comment", method: :delete, data: { confirm: 'Are you sure you want to remove this comment?' }, remote: true, class: "danger js-note-delete" do
14 %i.icon-trash.cred 14 %i.icon-trash.cred
15 Remove 15 Remove
16 = image_tag avatar_icon(note.author_email), class: "avatar s32" 16 = image_tag avatar_icon(note.author_email), class: "avatar s32"
spec/helpers/projects_helper_spec.rb
@@ -11,12 +11,12 @@ describe ProjectsHelper do @@ -11,12 +11,12 @@ describe ProjectsHelper do
11 it "returns the correct issues trackers available with current tracker 'gitlab' selected" do 11 it "returns the correct issues trackers available with current tracker 'gitlab' selected" do
12 project_issues_trackers('gitlab').should == 12 project_issues_trackers('gitlab').should ==
13 "<option value=\"redmine\">Redmine</option>\n" \ 13 "<option value=\"redmine\">Redmine</option>\n" \
14 - "<option value=\"gitlab\" selected=\"selected\">GitLab</option>" 14 + "<option selected=\"selected\" value=\"gitlab\">GitLab</option>"
15 end 15 end
16 16
17 it "returns the correct issues trackers available with current tracker 'redmine' selected" do 17 it "returns the correct issues trackers available with current tracker 'redmine' selected" do
18 project_issues_trackers('redmine').should == 18 project_issues_trackers('redmine').should ==
19 - "<option value=\"redmine\" selected=\"selected\">Redmine</option>\n" \ 19 + "<option selected=\"selected\" value=\"redmine\">Redmine</option>\n" \
20 "<option value=\"gitlab\">GitLab</option>" 20 "<option value=\"gitlab\">GitLab</option>"
21 end 21 end
22 end 22 end