diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-08-24 18:59:24 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-08-25 12:52:27 +0300 |
commit | 19da7a558711b38316d83012d919b7ea8252a26b (patch) | |
tree | cacd79075c1a78e1c3de42e913ada9796a1d5504 /spec/features/issues | |
parent | 610155e063251036f35aadd4dc0f707d1738e54b (diff) |
Fix failure when issue author is nil
Diffstat (limited to 'spec/features/issues')
-rw-r--r-- | spec/features/issues/issue_detail_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/features/issues/issue_detail_spec.rb b/spec/features/issues/issue_detail_spec.rb index 28b636f9359..c470cb7c716 100644 --- a/spec/features/issues/issue_detail_spec.rb +++ b/spec/features/issues/issue_detail_spec.rb @@ -40,4 +40,18 @@ feature 'Issue Detail', :js do end end end + + context 'when authored by a user who is later deleted' do + before do + issue.update_attribute(:author_id, nil) + sign_in(user) + visit project_issue_path(project, issue) + end + + it 'shows the issue' do + page.within('.issuable-details') do + expect(find('h2')).to have_content(issue.title) + end + end + end end |