diff options
author | Douwe Maan <douwe@gitlab.com> | 2016-08-23 00:33:58 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2016-08-23 00:33:58 +0000 |
commit | 51dca778ed7f0ad852d451a42676ac7d196e0e96 (patch) | |
tree | 0e4eeec668d16d8f710fc65409f0224231250890 /spec | |
parent | a79ff9346b73079148cc4ecc81da82804bb51f3c (diff) | |
parent | 8f9a7ca854ffda26c5ce9aed2aec10bf155d0463 (diff) | |
download | gitlab-ce-51dca778ed7f0ad852d451a42676ac7d196e0e96.tar.gz |
Merge branch 'revert_revert_issuable_lock' into 'master'
Revert the revert of Optimistic Locking
## What does this MR do?
It reverts the revert of optimistic lock https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5146 (and revert MR https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5245)
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/19871
Actually the code is already reviewed, except:
* Monkey patch `config/initializers/ar_monkey_patch.rb`
* We removed default values from migration `db/migrate/20160707104333_add_lock_to_issuables.rb`
See merge request !5623
Diffstat (limited to 'spec')
-rw-r--r-- | spec/features/issues_spec.rb | 11 | ||||
-rw-r--r-- | spec/features/merge_requests/edit_mr_spec.rb | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/spec/features/issues_spec.rb b/spec/features/issues_spec.rb index 2e595959f04..d744d0eb6af 100644 --- a/spec/features/issues_spec.rb +++ b/spec/features/issues_spec.rb @@ -122,6 +122,17 @@ describe 'Issues', feature: true do expect(page).to have_content date.to_s(:medium) end end + + it 'warns about version conflict' do + issue.update(title: "New title") + + fill_in 'issue_title', with: 'bug 345' + fill_in 'issue_description', with: 'bug description' + + click_button 'Save changes' + + expect(page).to have_content 'Someone edited the issue the same time you did' + end end end diff --git a/spec/features/merge_requests/edit_mr_spec.rb b/spec/features/merge_requests/edit_mr_spec.rb index 4109e78f560..c77e719c5df 100644 --- a/spec/features/merge_requests/edit_mr_spec.rb +++ b/spec/features/merge_requests/edit_mr_spec.rb @@ -17,5 +17,16 @@ feature 'Edit Merge Request', feature: true do it 'has class js-quick-submit in form' do expect(page).to have_selector('.js-quick-submit') end + + it 'warns about version conflict' do + merge_request.update(title: "New title") + + fill_in 'merge_request_title', with: 'bug 345' + fill_in 'merge_request_description', with: 'bug description' + + click_button 'Save changes' + + expect(page).to have_content 'Someone edited the merge request the same time you did' + end end end |