diff options
author | Rémy Coutable <remy@rymai.me> | 2017-03-30 14:29:40 +0300 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2017-04-03 13:12:03 +0300 |
commit | 1d9e14a564ccb7b9cdb68ad483700a5c9c6d605a (patch) | |
tree | 7931ff75d77a446aaa4e299a87273afb03dfc4ff /spec | |
parent | 54842848ec3bd520874c7d88ffc7d30e43e312d4 (diff) |
Merge branch '26595-fix-issue-preselected-template' into 'master'
Fix linking to new issue with selected template
Closes #26595
See merge request !10155
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues_spec.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 1c8267b1593..afdc5e4ac0a 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -13,6 +13,13 @@ describe 'Issues', feature: true do user2 = create(:user) project.team << [[@user, user2], :developer] + + project.repository.create_file( + @user, + '.gitlab/issue_templates/bug.md', + 'this is a test "bug" template', + message: 'added issue template', + branch_name: 'master') end describe 'Edit issue' do @@ -582,6 +589,16 @@ describe 'Issues', feature: true do expect(page.find_field("issue_description").value).to match /\n\n$/ end end + + context 'form filled by URL parameters' do + before do + visit new_namespace_project_issue_path(project.namespace, project, issuable_template: 'bug') + end + + it 'fills in template' do + expect(find('.js-issuable-selector .dropdown-toggle-text')).to have_content('bug') + end + end end describe 'new issue by email' do |