diff options
author | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-15 22:17:51 +0300 |
---|---|---|
committer | Zeger-Jan van de Weg <zegerjan@gitlab.com> | 2016-03-15 23:59:25 +0300 |
commit | 48274581551b73575149463be0c050f6b5a564ee (patch) | |
tree | b0a73eafdff2a6d5434c6a0b3dc1c5fbeafe74fb /spec | |
parent | 2b97c921196a7be904bfe4f0a31347c3583c9e88 (diff) |
Incorporate the review and update spec
The feature spec now also tests the absence of the new branch button
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues/new_branch_button_spec.rb | 11 | ||||
-rw-r--r-- | spec/services/system_note_service_spec.rb | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/spec/features/issues/new_branch_button_spec.rb b/spec/features/issues/new_branch_button_spec.rb index f47d7a5471b..462cb1f8f62 100644 --- a/spec/features/issues/new_branch_button_spec.rb +++ b/spec/features/issues/new_branch_button_spec.rb @@ -18,14 +18,13 @@ feature 'Start new branch from an issue', feature: true do end context "when there is a referenced merge request" do - let(:note) do + let(:note) do create(:note, :on_issue, :system, project: project, - note: "mentioned in !#{referenced_mr.iid}") + note: "mentioned in !#{referenced_mr.iid}") end - let(:referenced_mr) do - create(:merge_request, source_project: project, - target_project: project, - description: "Fixes ##{issue.iid}") + let(:referenced_mr) do + create(:merge_request, :simple, source_project: project, target_project: project, + description: "Fixes ##{issue.iid}") end before do diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 2730b42c612..8e6292014d4 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -287,7 +287,7 @@ describe SystemNoteService, services: true do context 'when a branch is created from the new branch button' do it 'sets the note text' do - expect(subject.note).to eq 'Started branch 1-mepmep' + expect(subject.note).to match /\AStarted branch [`1-mepmep`]/ end end end |