Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/features/projects/snippets/user_updates_snippet_spec.rb')
-rw-r--r--spec/features/projects/snippets/user_updates_snippet_spec.rb6
1 files changed, 2 insertions, 4 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