summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorblackst0ne <blackst0ne.ru@gmail.com>2017-05-03 18:07:53 +1100
committerblackst0ne <blackst0ne.ru@gmail.com>2017-05-04 12:58:41 +1100
commitc2b869a119f7400d748a8a97e4abc3137bc7c51d (patch)
treefe5e353f9eddb8acbb283cedc674df5c81f53b1e
parent35160a97f2dc781209515af4cdce6ff33e039cc9 (diff)
downloadgitlab-ce-c2b869a119f7400d748a8a97e4abc3137bc7c51d.tar.gz
Add specs for merge requests
-rw-r--r--spec/features/merge_requests/edit_mr_spec.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/features/merge_requests/edit_mr_spec.rb b/spec/features/merge_requests/edit_mr_spec.rb
index cb3bc392903..b0855af9524 100644
--- a/spec/features/merge_requests/edit_mr_spec.rb
+++ b/spec/features/merge_requests/edit_mr_spec.rb
@@ -67,5 +67,23 @@ feature 'Edit Merge Request', feature: true do
def get_textarea_height
page.evaluate_script('document.getElementById("merge_request_description").offsetHeight')
end
+
+ describe '"edited by" message', js: true do
+ context 'when merge request is updated' do
+ it 'shows "edited by" mesage on title update' do
+ fill_in 'merge_request_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 'merge_request_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
end