diff options
Diffstat (limited to 'spec/features/issues_spec.rb')
-rw-r--r-- | spec/features/issues_spec.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 81cc8513454..93b7880b96f 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -714,4 +714,26 @@ describe 'Issues', feature: true do expect(page).to have_text("updated title") end end + + describe '"edited by" message', js: true do + let(:issue) { create(:issue, project: project, author: @user) } + + context 'when issue is updated' do + before { visit edit_namespace_project_issue_path(project.namespace, project, issue) } + + it 'shows "edited by" mesage on title update' do + fill_in 'issue_title', with: 'hello world' + click_button 'Save changes' + + expect(page).to have_content("Edited less than a minute ago by #{@user.name}") + end + + it 'shows "edited by" mesage on description update' do + fill_in 'issue_description', with: 'hello world' + click_button 'Save changes' + + expect(page).to have_content("Edited less than a minute ago by #{@user.name}") + end + end + end end |