diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-09-13 21:36:13 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-09-15 21:51:09 +0300 |
commit | eed7960298d4dfc7f97c913fe31b7df2e0352d34 (patch) | |
tree | 740621e4acb51f8397745148a30c1808a6022b37 /spec/features/projects/issuable_templates_spec.rb | |
parent | d2370422c5d5f2b011b8c2349dab964e4088284b (diff) |
Fix issuable templates dropdown for forked projects
Diffstat (limited to 'spec/features/projects/issuable_templates_spec.rb')
-rw-r--r-- | spec/features/projects/issuable_templates_spec.rb | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/spec/features/projects/issuable_templates_spec.rb b/spec/features/projects/issuable_templates_spec.rb index d0f4e5469ed..f76c4fe8b57 100644 --- a/spec/features/projects/issuable_templates_spec.rb +++ b/spec/features/projects/issuable_templates_spec.rb @@ -64,7 +64,7 @@ feature 'issuable templates', feature: true, js: true do let(:template_content) { 'this is a test "feature-proposal" template' } let(:fork_user) { create(:user) } let(:fork_project) { create(:project, :public) } - let(:merge_request) { create(:merge_request, :with_diffs, source_project: fork_project) } + let(:merge_request) { create(:merge_request, :with_diffs, source_project: fork_project, target_project: project) } background do logout @@ -72,16 +72,20 @@ feature 'issuable templates', feature: true, js: true do fork_project.team << [fork_user, :master] create(:forked_project_link, forked_to_project: fork_project, forked_from_project: project) login_as fork_user - fork_project.repository.commit_file(fork_user, '.gitlab/merge_request_templates/feature-proposal.md', template_content, 'added merge request template', 'master', false) - visit edit_namespace_project_merge_request_path fork_project.namespace, fork_project, merge_request + project.repository.commit_file(fork_user, '.gitlab/merge_request_templates/feature-proposal.md', template_content, 'added merge request template', 'master', false) + visit edit_namespace_project_merge_request_path project.namespace, project, merge_request fill_in :'merge_request[title]', with: 'test merge request title' end - scenario 'user selects "feature-proposal" template' do - select_template 'feature-proposal' - wait_for_ajax - preview_template - save_changes + context 'feature proposal template' do + context 'template exists in target project' do + scenario 'user selects template' do + select_template 'feature-proposal' + wait_for_ajax + preview_template + save_changes + end + end end end |