summaryrefslogtreecommitdiff
path: root/spec/helpers
diff options
context:
space:
mode:
authorRuben Davila <rdavila84@gmail.com>2016-12-18 20:35:07 -0500
committerRuben Davila <rdavila84@gmail.com>2016-12-18 20:35:07 -0500
commitf8dde43d418d0a9f5a3ead75481cf9bfe8c2e7c6 (patch)
treea7721d69b0b4407c094fe250a43b0f865733842e /spec/helpers
parent1a366e25889bcbff7d731f30769c849aedef4010 (diff)
downloadgitlab-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.rb2
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")