Commit f8dde43d authored by Ruben Davila's avatar Ruben Davila

Always use `fixture_file_upload` helper to upload files in tests.

* Also is not a good idea to use without closing the file
  handler. We should use it with a block or close it explicitly.
parent 1a366e25
......@@ -6,7 +6,7 @@ describe GroupsHelper do
it 'returns an url for the avatar' do
group = create(:group)
group.avatar =
group.avatar = fixture_file_upload(avatar_file_path)!
to match("/uploads/group/avatar/#{}/banana_sample.gif")
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment