diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-07-27 13:07:24 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-07-27 13:07:24 +0300 |
commit | d2b026f09288fd1abd3ad5dcf27816189c69c729 (patch) | |
tree | 4b8e6ed78d1457b26db3add7850c8623942b6ae8 /spec/features/issues_spec.rb | |
parent | 7d3c98e75497f5bb937dda0905b81e42cfe87f23 (diff) |
Test both for having existing issues or not
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r-- | spec/features/issues_spec.rb | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 9ceefc9150b..93dcb2ec3fc 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -525,7 +525,7 @@ describe 'Issues', feature: true do end describe 'new issue by email' do - context 'click the button to show modal for new issue email', js: true do + shared_examples 'show the email in the modal' do before do stub_incoming_email_setting(enabled: true, address: "p+%{key}@gl.ab") @@ -533,7 +533,7 @@ describe 'Issues', feature: true do click_button('Email a new issue') end - it 'shows the email in the modal' do + it 'click the button to show modal for the new email' do page.within '#issue-email-modal' do email = project.new_issue_address(@user) @@ -541,6 +541,16 @@ describe 'Issues', feature: true do end end end + + context 'with existing issues' do + let!(:issue) { create(:issue, project: project, author: @user) } + + it_behaves_like 'show the email in the modal' + end + + context 'without existing issues' do + it_behaves_like 'show the email in the modal' + end end describe 'due date' do |