Merge branch 'humanize-over-titleize' into 'master'

Use humanize instead of titleize for MR title suggestion
This commit is contained in:
Dmitriy Zaporozhets 2014-03-25 10:06:11 +00:00
commit e320ee3fb7
3 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ module MergeRequestsHelper
target_project_id: target_project.id, target_project_id: target_project.id,
source_branch: event.branch_name, source_branch: event.branch_name,
target_branch: target_project.repository.root_ref, target_branch: target_project.repository.root_ref,
title: event.branch_name.titleize title: event.branch_name.humanize
} }
end end

View File

@ -3,5 +3,5 @@
var mrTitle = $('#merge_request_title'); var mrTitle = $('#merge_request_title');
if(mrTitle.val().length == 0) { if(mrTitle.val().length == 0) {
mrTitle.val("#{params[:ref].titleize}"); mrTitle.val("#{params[:ref].humanize}");
} }

View File

@ -25,7 +25,7 @@ class Dashboard < Spinach::FeatureSteps
find("#merge_request_target_project_id").value.should == @project.id.to_s find("#merge_request_target_project_id").value.should == @project.id.to_s
find("#merge_request_source_branch").value.should == "new_design" find("#merge_request_source_branch").value.should == "new_design"
find("#merge_request_target_branch").value.should == "master" find("#merge_request_target_branch").value.should == "master"
find("#merge_request_title").value.should == "New Design" find("#merge_request_title").value.should == "New design"
end end
Given 'user with name "John Doe" joined project "Shop"' do Given 'user with name "John Doe" joined project "Shop"' do