diff options
author | Robert Speicher <rspeicher@gmail.com> | 2018-06-07 00:26:00 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2018-06-07 17:54:41 +0300 |
commit | b38c75b3dc2dc655377a1b4070cb6f5242594dbe (patch) | |
tree | 658f1ea057aa6785ea4f378378a800b2b82f9d7f /spec/helpers | |
parent | 6d165c740cecf6aff4c7ec0bbb962e7964c15f1b (diff) |
Correct more usages of non-relative `fixture_file_upload` paths
Diffstat (limited to 'spec/helpers')
-rw-r--r-- | spec/helpers/emails_helper_spec.rb | 4 | ||||
-rw-r--r-- | spec/helpers/groups_helper_spec.rb | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/spec/helpers/emails_helper_spec.rb b/spec/helpers/emails_helper_spec.rb index 2390c1f3e5d..139387e0b24 100644 --- a/spec/helpers/emails_helper_spec.rb +++ b/spec/helpers/emails_helper_spec.rb @@ -47,9 +47,7 @@ describe EmailsHelper do describe '#header_logo' do context 'there is a brand item with a logo' do it 'returns the brand header logo' do - appearance = create :appearance, header_logo: fixture_file_upload( - Rails.root.join('spec/fixtures/dk.png') - ) + appearance = create :appearance, header_logo: fixture_file_upload('spec/fixtures/dk.png') expect(header_logo).to eq( %{<img style="height: 50px" src="/uploads/-/system/appearance/header_logo/#{appearance.id}/dk.png" alt="Dk" />} diff --git a/spec/helpers/groups_helper_spec.rb b/spec/helpers/groups_helper_spec.rb index b48c252acd3..6c94bd4e504 100644 --- a/spec/helpers/groups_helper_spec.rb +++ b/spec/helpers/groups_helper_spec.rb @@ -4,9 +4,9 @@ describe GroupsHelper do include ApplicationHelper describe 'group_icon' do - avatar_file_path = File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif') - it 'returns an url for the avatar' do + avatar_file_path = File.join('spec', 'fixtures', 'banana_sample.gif') + group = create(:group) group.avatar = fixture_file_upload(avatar_file_path) group.save! @@ -17,9 +17,9 @@ describe GroupsHelper do end describe 'group_icon_url' do - avatar_file_path = File.join(Rails.root, 'spec', 'fixtures', 'banana_sample.gif') - it 'returns an url for the avatar' do + avatar_file_path = File.join('spec', 'fixtures', 'banana_sample.gif') + group = create(:group) group.avatar = fixture_file_upload(avatar_file_path) group.save! |