[Git][noosfero/noosfero][master] application-helper: fix favicon tests

Rodrigo Souto gitlab at mg.gitlab.com
Wed Jul 19 18:48:23 BRT 2017


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
43b34a84 by Rodrigo Souto at 2017-07-19T18:46:44-03:00
application-helper: fix favicon tests

- - - - -


1 changed file:

- test/unit/application_helper_test.rb


Changes:

=====================================
test/unit/application_helper_test.rb
=====================================
--- a/test/unit/application_helper_test.rb
+++ b/test/unit/application_helper_test.rb
@@ -499,7 +499,7 @@ class ApplicationHelperTest < ActionView::TestCase
   should 'use favicon from profile theme if the profile has theme' do
     stubs(:environment).returns(fast_create(Environment, :theme => 'new-theme'))
     stubs(:profile).returns(fast_create(Profile, :theme => 'profile-theme'))
-    File.expects(:exists?).with(Rails.root.join('public', '/designs/themes/profile-theme', 'favicon.ico')).returns(true)
+    File.expects(:exists?).with(File.join(Rails.root, 'public', '/designs/themes/profile-theme', 'favicon.ico')).returns(true)
     assert_equal '/designs/themes/profile-theme/favicon.ico', theme_favicon
   end
 
@@ -507,7 +507,7 @@ class ApplicationHelperTest < ActionView::TestCase
     stubs(:environment).returns(fast_create(Environment, :theme => 'new-theme'))
     stubs(:profile).returns(fast_create(Profile, :theme => 'profile-theme'))
     file = create(UploadedFile, :uploaded_data => fixture_file_upload('/files/favicon.ico', 'image/x-ico'), :profile => profile)
-    File.expects(:exists?).with(Rails.root.join('public', theme_path, 'favicon.ico')).returns(false)
+    File.expects(:exists?).with(File.join(Rails.root, 'public', theme_path, 'favicon.ico')).returns(false)
 
     assert_match /favicon.ico/, theme_favicon
   end
@@ -515,7 +515,7 @@ class ApplicationHelperTest < ActionView::TestCase
   should 'use favicon from environment if the profile theme and profile articles do not have' do
     stubs(:environment).returns(fast_create(Environment, :theme => 'new-theme'))
     stubs(:profile).returns(fast_create(Profile, :theme => 'profile-theme'))
-    File.expects(:exists?).with(Rails.root.join('public', theme_path, 'favicon.ico')).returns(false)
+    File.expects(:exists?).with(File.join(Rails.root, 'public', theme_path, 'favicon.ico')).returns(false)
     assert_equal '/designs/themes/new-theme/favicon.ico', theme_favicon
   end
 



View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/43b34a84179105cc8d046432e056d665926f98f3

---
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/43b34a84179105cc8d046432e056d665926f98f3
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170719/da0aa635/attachment-0001.html>


More information about the Noosfero-dev mailing list