summaryrefslogtreecommitdiff
path: root/spec/features/snippets
diff options
context:
space:
mode:
authorOswaldo Ferreira <oswaldo@gitlab.com>2019-06-04 20:50:57 -0300
committerOswaldo Ferreira <oswaldo@gitlab.com>2019-06-17 11:25:40 -0300
commit44e1915d4f0e20cf445196ccc7e1d279c75ef0ce (patch)
tree2619dcea9bf96af77023f8fb9a0b84cd5a8f69ee /spec/features/snippets
parente398409a74db7f3ca1c90d3b056b3a84ebb1b6cf (diff)
downloadgitlab-ce-44e1915d4f0e20cf445196ccc7e1d279c75ef0ce.tar.gz
Persist tmp snippet uploads
It persist temporary personal snippets under user/:id namespaces temporarily while creating a upload record to track it. If an user gets removed while it's still a tmp upload, it also gets removed. If the tmp upload is sent, the upload gets moved to personal_snippets/:id as before. The upload record also gets updated to the new model type as well.
Diffstat (limited to 'spec/features/snippets')
-rw-r--r--spec/features/snippets/user_creates_snippet_spec.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/features/snippets/user_creates_snippet_spec.rb b/spec/features/snippets/user_creates_snippet_spec.rb
index 1c97d5ec5b4..93d77d5b5ce 100644
--- a/spec/features/snippets/user_creates_snippet_spec.rb
+++ b/spec/features/snippets/user_creates_snippet_spec.rb
@@ -41,7 +41,7 @@ describe 'User creates snippet', :js do
expect(page).to have_content('My Snippet')
link = find('a.no-attachment-icon img[alt="banana_sample"]')['src']
- expect(link).to match(%r{/uploads/-/system/temp/\h{32}/banana_sample\.gif\z})
+ expect(link).to match(%r{/uploads/-/system/user/#{user.id}/\h{32}/banana_sample\.gif\z})
reqs = inspect_requests { visit(link) }
expect(reqs.first.status_code).to eq(200)