summaryrefslogtreecommitdiff
path: root/spec/features/projects/blobs
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-03-07 12:35:07 +0000
committerPhil Hughes <me@iamphill.com>2019-03-07 12:35:07 +0000
commit6a3a28bfdec6feeebd880d048f8577906b48aaa7 (patch)
treecb924cfa108106d21ff5d400a0a83f20ff8ec17c /spec/features/projects/blobs
parent45b3c5420c1a45595211f941bac23ad9f2188af7 (diff)
downloadgitlab-ce-6a3a28bfdec6feeebd880d048f8577906b48aaa7.tar.gz
Fixed the blob editor deleting all content for files
This only happens for files that the path consists of only numbers Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58578
Diffstat (limited to 'spec/features/projects/blobs')
-rw-r--r--spec/features/projects/blobs/edit_spec.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/features/projects/blobs/edit_spec.rb b/spec/features/projects/blobs/edit_spec.rb
index 828f6f9921e..57d21f3e182 100644
--- a/spec/features/projects/blobs/edit_spec.rb
+++ b/spec/features/projects/blobs/edit_spec.rb
@@ -49,6 +49,15 @@ describe 'Editing file blob', :js do
end
end
+ it 'updates the content of file with a number as file path' do
+ project.repository.create_file(user, '1', 'test', message: 'testing', branch_name: branch)
+ visit project_blob_path(project, tree_join(branch, '1'))
+
+ edit_and_commit
+
+ expect(page).to have_content 'NextFeature'
+ end
+
context 'from blob file path' do
before do
visit project_blob_path(project, tree_join(branch, file_path))