diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2017-02-18 03:47:56 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2017-02-18 03:47:56 +0300 |
commit | 32b59a1fa7f439cccbf0de29094c3fab3ec518a8 (patch) | |
tree | 0f83f79060a91762e9f9f8ce16f8095f19398360 /spec/features/issuables | |
parent | 24a9d694d9f5370248c272e2a5f596946d193b10 (diff) |
Added specs
Diffstat (limited to 'spec/features/issuables')
-rw-r--r-- | spec/features/issuables/issuable_list_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/features/issuables/issuable_list_spec.rb b/spec/features/issuables/issuable_list_spec.rb index e31bc40adc3..13ea9ce853c 100644 --- a/spec/features/issuables/issuable_list_spec.rb +++ b/spec/features/issuables/issuable_list_spec.rb @@ -30,6 +30,12 @@ describe 'issuable list', feature: true do end end + it "counts merge requests closing issues icons for each issue" do + visit_issuable_list(:issue) + + expect(first('.icon-merge-request-unmerged').find(:xpath, '..')).to have_content(1) + end + def visit_issuable_list(issuable_type) if issuable_type == :issue visit namespace_project_issues_path(project.namespace, project) @@ -42,6 +48,13 @@ describe 'issuable list', feature: true do 3.times do if issuable_type == :issue issuable = create(:issue, project: project, author: user) + merge_request = create(:merge_request, + title: FFaker::Lorem.sentence, + description: "Closes #{issuable.to_reference}", + source_project: project, + source_branch: FFaker::Name.name) + + MergeRequestsClosingIssues.create!(issue: issuable, merge_request: merge_request) else issuable = create(:merge_request, title: FFaker::Lorem.sentence, source_project: project, source_branch: FFaker::Name.name) end |