noosfero | Remove dead code
Antonio Terceiro
gitlab at gitlab.com
Tue Jan 27 20:05:41 BRST 2015
Antonio Terceiro pushed to refs/heads/master at <a href="https://gitlab.com/noosfero/noosfero">Noosfero / noosfero</a>
Commits:
<a href="https://gitlab.com/noosfero/noosfero/commit/fe6c058f9a655b5378bb5a3758e1eb687cbbad4c">fe6c058f</a> by Antonio Terceiro
Remove dead code
- - - - -
Changes:
=====================================
app/helpers/person_notifier_helper.rb
=====================================
--- a/app/helpers/person_notifier_helper.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-module PersonNotifierHelper
-
- include ApplicationHelper
-
- private
-
- def path_to_image(source)
- top_url + source
- end
-
- def top_url
- top_url = @profile.environment ? @profile.environment.top_url : ''
- end
-
-end
=====================================
app/models/person_notifier.rb
=====================================
--- a/app/models/person_notifier.rb
+++ b/app/models/person_notifier.rb
@@ -67,7 +67,7 @@ class PersonNotifier
class Mailer < ActionMailer::Base
- add_template_helper(PersonNotifierHelper)
+ add_template_helper(ApplicationHelper)
def session
{:theme => nil}
=====================================
test/unit/person_notifier_helper_test.rb
=====================================
--- a/test/unit/person_notifier_helper_test.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-require_relative "../test_helper"
-
-class PersonNotifierHelperTest < ActionView::TestCase
-
- include PersonNotifierHelper
-
- def setup
- @profile = mock
- @env = Environment.new
- end
- attr_reader :profile, :env
-
- should 'append top url of environment at image path' do
- profile.expects(:environment).returns(env).at_least_once
- assert_match /src="http:\/\/localhost\/image.png"/, image_tag("/image.png")
- end
-
- should 'return original path if do not have an environment' do
- profile.expects(:environment).returns(nil).at_least_once
- assert_match /src="\/image.png"/, image_tag("/image.png")
- end
-
-end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20150127/b84ee5c8/attachment.html>
More information about the Noosfero-dev
mailing list