aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2013-11-19 22:20:35 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2013-12-02 20:02:06 -0200
commit016eb65d7e335b82de49f55f1de679e06855d89c (patch)
tree07f27e3582b5a5fb9218aa35ce801ccd03e3e854 /activesupport
parent81abcb79476bdfcd25da26d11690104c5e7e538a (diff)
downloadrails-016eb65d7e335b82de49f55f1de679e06855d89c.tar.gz
rails-016eb65d7e335b82de49f55f1de679e06855d89c.tar.bz2
rails-016eb65d7e335b82de49f55f1de679e06855d89c.zip
:scissors:
[ci skip]
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/test/message_verifier_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activesupport/test/message_verifier_test.rb b/activesupport/test/message_verifier_test.rb
index f0f261d710..f208814468 100644
--- a/activesupport/test/message_verifier_test.rb
+++ b/activesupport/test/message_verifier_test.rb
@@ -11,7 +11,7 @@ require 'active_support/time'
require 'active_support/json'
class MessageVerifierTest < ActiveSupport::TestCase
-
+
class JSONSerializer
def dump(value)
ActiveSupport::JSON.encode(value)
@@ -21,7 +21,7 @@ class MessageVerifierTest < ActiveSupport::TestCase
ActiveSupport::JSON.decode(value)
end
end
-
+
def setup
@verifier = ActiveSupport::MessageVerifier.new("Hey, I'm a secret!")
@data = { :some => "data", :now => Time.local(2010) }
@@ -43,7 +43,7 @@ class MessageVerifierTest < ActiveSupport::TestCase
assert_not_verified("#{data}--#{hash.reverse}")
assert_not_verified("purejunk")
end
-
+
def test_alternative_serialization_method
prev = ActiveSupport.use_standard_json_time_format
ActiveSupport.use_standard_json_time_format = true
@@ -54,7 +54,7 @@ class MessageVerifierTest < ActiveSupport::TestCase
ensure
ActiveSupport.use_standard_json_time_format = prev
end
-
+
def assert_not_verified(message)
assert_raise(ActiveSupport::MessageVerifier::InvalidSignature) do
@verifier.verify(message)