mirror of
https://github.com/Retrospring/retrospring.git
synced 2024-11-20 14:09:53 +01:00
Test exporting with profile picture
This commit is contained in:
parent
c009dff560
commit
bc07a9fbb0
1 changed files with 15 additions and 0 deletions
|
@ -271,5 +271,20 @@ RSpec.describe Exporter do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "exporting a user with a profile picture" do
|
||||
before do
|
||||
user.profile_picture = Rack::Test::UploadedFile.new(File.open("#{file_fixture_path}/banana_racc.jpg"))
|
||||
user.save!
|
||||
end
|
||||
|
||||
it "exports the header image" do
|
||||
subject
|
||||
dirname = instance.instance_variable_get(:@export_dirname)
|
||||
%i[large medium small original].each do |size|
|
||||
expect(File.exist?("#{dirname}/pictures/picture_#{size}_banana_racc.jpg")).to eq(true)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue