noosfero | Rename upload file (!1272)
Rodrigo Souto
gitlab at mg.gitlab.com
Thu Jul 6 16:06:47 BRT 2017
Rodrigo Souto started a new discussion on test/functional/cms_controller_test.rb:
> file.destroy
> end
>
> + should 'be able to rename upload file' do
> + post :new, :profile => profile identifier,
> + :uploaded_file => { :filename => 'newname' }
> + :type => UploadedFile.name,
> + :article => {:uploaded_data => fixture_file_upload('/files/rails.png', 'image/png')}
> +
> + process_delayed_job_queue
> + file = FilePresenter.for profile.articles.find_by(name: 'newnamepng')
> + assert File.exists?(file.icon_name)
> + assert File.name == 'newnamepng'
You probably meant `file.name` here instead of `File.name`.
Also, use `assert_equal 'newnamepng', file.name` instead.
---
Reply to this email directly or view it on GitLab: https://gitlab.com/noosfero/noosfero/merge_requests/1272#note_34374530
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170706/dacd0dbd/attachment.html>
More information about the Noosfero-dev
mailing list