Sha256: 3f094838f620f23ce3503763d5832b500248a097ac1c7d6681231083ac548144

Contents?: true

Size: 451 Bytes

Versions: 5

Compression:

Stored size: 451 Bytes

Contents

require 'test_helper'

class PaymentMethodHelperTest < ActionView::TestCase

  include Kaui::PaymentMethodHelper

  test 'is_json?' do
    assert !is_json?(5)
    assert !is_json?('true')
    assert !is_json?(false)
    assert !is_json?("")
    assert !is_json?(nil)
    assert is_json?('[1, 2, 3]')
    assert is_json?('{"value": "New", "onclick": "CreateNewDoc()"}')
    assert !is_json?('{"value" => "New", "onclick": "CreateNewDoc()"}')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kaui-2.1.0 test/unit/helpers/kaui/payment_method_helper_test.rb
kaui-2.0.4 test/unit/helpers/kaui/payment_method_helper_test.rb
kaui-2.0.3 test/unit/helpers/kaui/payment_method_helper_test.rb
kaui-2.0.2 test/unit/helpers/kaui/payment_method_helper_test.rb
kaui-2.0.1 test/unit/helpers/kaui/payment_method_helper_test.rb