aboutsummaryrefslogblamecommitdiffstats
path: root/activerecord/test/cases/coders/json_test.rb
blob: d22d93d1291b7e46712ac6132f7dfcd0f03691ea (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                
require "cases/helper"

module ActiveRecord
  module Coders
    class JSONTest < ActiveRecord::TestCase
      def test_returns_nil_if_empty_string_given
        assert_nil JSON.load("")
      end

      def test_returns_nil_if_nil_given
        assert_nil JSON.load(nil)
      end
    end
  end
end