diff --git a/app/models/concerns/team_duplication.rb b/app/models/concerns/team_duplication.rb index 4af04a7b68..642700e497 100644 --- a/app/models/concerns/team_duplication.rb +++ b/app/models/concerns/team_duplication.rb @@ -45,6 +45,7 @@ def self.modify_settings(old_team, new_team) new_list_columns = old_team.get_list_columns.to_a.collect{|lc| lc.include?("task_value_") ? "task_value_#{team_task_map[lc.split("_").last.to_i]}" : lc} new_team.set_list_columns = new_list_columns unless new_list_columns.blank? new_team.set_languages = old_team.get_languages + new_team.set_language = old_team.get_language new_team end diff --git a/test/models/team_test.rb b/test/models/team_test.rb index 98655c9c88..fb85ad27ba 100644 --- a/test/models/team_test.rb +++ b/test/models/team_test.rb @@ -984,6 +984,16 @@ def setup assert_equal ['alegre'], tbi.map(&:user).map(&:login) end + test "should duplicate team with non english default language" do + t1 = create_team + t1.set_languages = ['fr'] + t1.set_language = 'fr' + t1.save! + t2 = Team.duplicate(t1) + assert_equal ['fr'], t2.get_languages + assert_equal 'fr', t2.get_language + end + test "should delete team and partition" do t = create_team assert_difference 'Team.count', -1 do