Test exporting with profile picture

This commit is contained in:
Karina Kwiatek 2022-07-10 18:50:39 +02:00 committed by Karina Kwiatek
parent c009dff560
commit bc07a9fbb0
1 changed files with 15 additions and 0 deletions

View File

@ -271,5 +271,20 @@ RSpec.describe Exporter do
end end
end 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
end end