require'spec_helper'describeGroups::MilestonesControllerdolet(:group){create(:group)}let(:project){create(:project,group: group)}let(:project2){create(:empty_project,group: group)}let(:user){create(:user)}let(:title){'肯定不是中文的问题'}beforedosign_in(user)group.add_owner(user)project.team<<[user,:master]controller.instance_variable_set(:@group,group)enddescribe"#create"doit"should create group milestone with Chinese title"dopost:create,group_id: group.id,milestone: {project_ids: [project.id,project2.id],title: title}expect(response).toredirect_to(group_milestone_path(group,title.to_slug.to_s,title: title))expect(Milestone.where(title: title).count).toeq(2)endendend