diff options
author | Ruben Davila <rdavila84@gmail.com> | 2016-12-18 20:35:07 -0500 |
---|---|---|
committer | Ruben Davila <rdavila84@gmail.com> | 2016-12-18 20:35:07 -0500 |
commit | f8dde43d418d0a9f5a3ead75481cf9bfe8c2e7c6 (patch) | |
tree | a7721d69b0b4407c094fe250a43b0f865733842e /spec/helpers | |
parent | 1a366e25889bcbff7d731f30769c849aedef4010 (diff) | |
download | gitlab-ce-f8dde43d418d0a9f5a3ead75481cf9bfe8c2e7c6.tar.gz |
Always use `fixture_file_upload` helper to upload files in tests.fix-groups-helper-spec
* Also is not a good idea to use File.open without closing the file
handler. We should use it with a block or close it explicitly.
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/groups_helper_spec.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/helpers/groups_helper_spec.rb b/spec/helpers/groups_helper_spec.rb index 233d00534e5..c8b0d86425f 100644 --- a/spec/helpers/groups_helper_spec.rb +++ b/spec/helpers/groups_helper_spec.rb @@ -6,7 +6,7 @@ describe GroupsHelper do it 'returns an url for the avatar' do group = create(:group) - group.avatar = File.open(avatar_file_path) + group.avatar = fixture_file_upload(avatar_file_path) group.save! expect(group_icon(group.path).to_s). to match("/uploads/group/avatar/#{group.id}/banana_sample.gif") |