debian-mirror-gitlab/spec/requests/uploads_controller_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
537 B
Ruby
Raw Normal View History

2023-07-09 08:55:56 +05:30
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe UploadsController, feature_category: :shared do
include WorkhorseHelpers
it_behaves_like 'uploads actions' do
let_it_be(:model) { create(:personal_snippet, :public) }
let_it_be(:upload) { create(:upload, :personal_snippet_upload, :with_file, model: model) }
# See config/routes/uploads.rb
let(:show_path) do
"/uploads/-/system/#{model.model_name.singular}/#{model.to_param}/#{upload.secret}/#{File.basename(upload.path)}"
end
end
end