summaryrefslogtreecommitdiff
path: root/spec/features
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 18:09:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 18:09:37 +0000
commit495c22d1245b6212b21b7379a542df73dfa77206 (patch)
tree5f0f82dd6c8c4fe1c4bd411f9e398b1a6eaaa69f /spec/features
parentf3b1e07903a7f509b11ad7cf188fac46d98f77f6 (diff)
downloadgitlab-ce-495c22d1245b6212b21b7379a542df73dfa77206.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/features')
-rw-r--r--spec/features/projects/snippets/user_updates_snippet_spec.rb6
-rw-r--r--spec/features/snippets/user_edits_snippet_spec.rb6
2 files changed, 4 insertions, 8 deletions
diff --git a/spec/features/projects/snippets/user_updates_snippet_spec.rb b/spec/features/projects/snippets/user_updates_snippet_spec.rb
index 58ca922b9cb..bad3fde8a4a 100644
--- a/spec/features/projects/snippets/user_updates_snippet_spec.rb
+++ b/spec/features/projects/snippets/user_updates_snippet_spec.rb
@@ -54,11 +54,9 @@ describe 'Projects > Snippets > User updates a snippet', :js do
end
context 'when the git operation fails' do
- let(:error_message) { 'foobar' }
-
before do
allow_next_instance_of(Snippets::UpdateService) do |instance|
- allow(instance).to receive(:create_commit).and_raise(StandardError, error_message)
+ allow(instance).to receive(:create_commit).and_raise(StandardError)
end
fill_in('project_snippet_title', with: 'Snippet new title')
@@ -67,7 +65,7 @@ describe 'Projects > Snippets > User updates a snippet', :js do
end
it 'renders edit page and displays the error' do
- expect(page.find('.flash-container span').text).to eq(error_message)
+ expect(page.find('.flash-container span').text).to eq('Error updating the snippet')
expect(page).to have_content('Edit Snippet')
end
end
diff --git a/spec/features/snippets/user_edits_snippet_spec.rb b/spec/features/snippets/user_edits_snippet_spec.rb
index 1ec18e3e0e3..0bbb92b1f3f 100644
--- a/spec/features/snippets/user_edits_snippet_spec.rb
+++ b/spec/features/snippets/user_edits_snippet_spec.rb
@@ -85,11 +85,9 @@ describe 'User edits snippet', :js do
end
context 'when the git operation fails' do
- let(:error_message) { 'foobar' }
-
before do
allow_next_instance_of(Snippets::UpdateService) do |instance|
- allow(instance).to receive(:create_commit).and_raise(StandardError, error_message)
+ allow(instance).to receive(:create_commit).and_raise(StandardError)
end
fill_in 'personal_snippet_title', with: 'New Snippet Title'
@@ -98,7 +96,7 @@ describe 'User edits snippet', :js do
end
it 'renders edit page and displays the error' do
- expect(page.find('.flash-container span').text).to eq(error_message)
+ expect(page.find('.flash-container span').text).to eq('Error updating the snippet')
expect(page).to have_content('Edit Snippet')
end
end