Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuben Davila <rdavila84@gmail.com>2016-12-19 04:35:07 +0300
committerRuben Davila <rdavila84@gmail.com>2016-12-19 04:35:07 +0300
commitf8dde43d418d0a9f5a3ead75481cf9bfe8c2e7c6 (patch)
treea7721d69b0b4407c094fe250a43b0f865733842e /spec/helpers/groups_helper_spec.rb
parent1a366e25889bcbff7d731f30769c849aedef4010 (diff)
Always use `fixture_file_upload` helper to upload files in tests.
* 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/groups_helper_spec.rb')
-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")