Make rupocop happy and correct placement of include
authorSimon Poole <simon@poole.ch>
Sun, 19 Feb 2017 11:35:02 +0000 (12:35 +0100)
committerSimon Poole <simon@poole.ch>
Sun, 19 Feb 2017 11:35:02 +0000 (12:35 +0100)
test/helpers/user_blocks_helper_test.rb

index 026ddc300e7b140dd6965b25778e66f3fe6df301..de5ff1c6a8cdbeba56bf04284100779e280ba1f9 100644 (file)
@@ -1,9 +1,8 @@
 # coding: utf-8
 require "test_helper"
-include ApplicationHelper
 
 class UserBlocksHelperTest < ActionView::TestCase
-
+  include ApplicationHelper
   def setup
     I18n.locale = "en"
   end
@@ -29,7 +28,7 @@ class UserBlocksHelperTest < ActionView::TestCase
       :needs_view => true,
       :ends_at => Time.now.getutc + 60.minutes
     )
-    assert_equal I18n.t("user_block.helper.time_future_and_until_login", :time => friendly_date(block_end)).html_safe, block_status(block)
+    assert_equal I18n.t("user_block.helper.time_future_and_until_login", :time => friendly_date(block_end)), block_status(block)
     block_end = Time.now.getutc + 60.minutes
     block = UserBlock.create(
       :user_id => 1,
@@ -38,6 +37,6 @@ class UserBlocksHelperTest < ActionView::TestCase
       :needs_view => false,
       :ends_at => Time.now.getutc + 60.minutes
     )
-    assert_equal I18n.t("user_block.helper.time_future", :time => friendly_date(block_end)).html_safe, block_status(block)
+    assert_equal I18n.t("user_block.helper.time_future", :time => friendly_date(block_end)), block_status(block)
   end
 end