summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2016-11-08 15:21:47 +0000
committerSean McGivern <sean@mcgivern.me.uk>2016-11-08 15:21:47 +0000
commit358e8141cdcef5b4fae6554a89576c7837e102d6 (patch)
tree0767a2803df6b0b08d597fb855a6600ad67d053e
parentc3341884107b65545f9c352d2090dc2a5cf58e19 (diff)
parent7108e2e75362aec227765820e116e3d7bc1ac08d (diff)
downloadgitlab-ce-358e8141cdcef5b4fae6554a89576c7837e102d6.tar.gz
Merge branch 'fix-new-branch-button-spec' into 'master'
Fix new branch button spec Closes #24089. See merge request !7284
-rw-r--r--spec/features/issues/new_branch_button_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/features/issues/new_branch_button_spec.rb b/spec/features/issues/new_branch_button_spec.rb
index fb0c4704285..755f4eb1b0b 100644
--- a/spec/features/issues/new_branch_button_spec.rb
+++ b/spec/features/issues/new_branch_button_spec.rb
@@ -18,8 +18,8 @@ feature 'Start new branch from an issue', feature: true do
end
context "when there is a referenced merge request" do
- let(:note) do
- create(:note, :on_issue, :system, project: project,
+ let!(:note) do
+ create(:note, :on_issue, :system, project: project, noteable: issue,
note: "Mentioned in !#{referenced_mr.iid}")
end
let(:referenced_mr) do
@@ -28,12 +28,13 @@ feature 'Start new branch from an issue', feature: true do
end
before do
- issue.notes << note
+ referenced_mr.cache_merge_request_closes_issues!(user)
visit namespace_project_issue_path(project.namespace, project, issue)
end
it "hides the new branch button", js: true do
+ expect(page).to have_css('#new-branch .unavailable')
expect(page).not_to have_css('#new-branch .available')
expect(page).to have_content /1 Related Merge Request/
end