diff options
author | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-08-07 20:01:45 +0200 |
---|---|---|
committer | Bob Van Landuyt <bob@vanlanduyt.co> | 2017-08-11 18:17:45 +0200 |
commit | 2ea8442ff3398a788b1005a825c1d13f61f91c2d (patch) | |
tree | 56ac4b29d6a81519aa68b2614ba208b757baf3f9 /spec/migrations | |
parent | 180de2d20127f79773bf661f88cd7556b191d0b9 (diff) | |
download | gitlab-ce-2ea8442ff3398a788b1005a825c1d13f61f91c2d.tar.gz |
Move the personal snippet uploads from `system` to `-/system`bvl-rollback-renamed-system-namespace
Update the markdown unconditionally since the move might have been
done before, but the markdown not updated.
Diffstat (limited to 'spec/migrations')
-rw-r--r-- | spec/migrations/move_personal_snippets_files_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/migrations/move_personal_snippets_files_spec.rb b/spec/migrations/move_personal_snippets_files_spec.rb index c17e453fe68..1a319eccc0d 100644 --- a/spec/migrations/move_personal_snippets_files_spec.rb +++ b/spec/migrations/move_personal_snippets_files_spec.rb @@ -42,7 +42,7 @@ describe MovePersonalSnippetsFiles do describe 'updating the markdown' do it 'includes the new path when the file exists' do secret = "secret#{snippet.id}" - file_location = "/uploads/system/personal_snippet/#{snippet.id}/#{secret}/picture.jpg" + file_location = "/uploads/-/system/personal_snippet/#{snippet.id}/#{secret}/picture.jpg" migration.up @@ -60,7 +60,7 @@ describe MovePersonalSnippetsFiles do it 'updates the note markdown' do secret = "secret#{snippet.id}" - file_location = "/uploads/system/personal_snippet/#{snippet.id}/#{secret}/picture.jpg" + file_location = "/uploads/-/system/personal_snippet/#{snippet.id}/#{secret}/picture.jpg" markdown = markdown_linking_file('picture.jpg', snippet) note = create(:note_on_personal_snippet, noteable: snippet, note: "with #{markdown}") @@ -108,7 +108,7 @@ describe MovePersonalSnippetsFiles do it 'keeps the markdown as is when the file is missing' do secret = "secret#{snippet_with_missing_file.id}" - file_location = "/uploads/system/personal_snippet/#{snippet_with_missing_file.id}/#{secret}/picture.jpg" + file_location = "/uploads/-/system/personal_snippet/#{snippet_with_missing_file.id}/#{secret}/picture.jpg" migration.down @@ -167,7 +167,7 @@ describe MovePersonalSnippetsFiles do def markdown_linking_file(filename, snippet, in_new_path: false) markdown = "![#{filename.split('.')[0]}]" markdown += '(/uploads' - markdown += '/system' if in_new_path + markdown += '/-/system' if in_new_path markdown += "/#{model_file_path(filename, snippet)})" markdown end |