aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/coders/json_test.rb
blob: e40d576b394f391a4e050d136f06e7f46174a12a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

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