Sha256: b4c869b35da68309050e81f9775feda1a0dc3bf96f315857a5d14919f5de0612
Contents?: true
Size: 460 Bytes
Versions: 27
Compression:
Stored size: 460 Bytes
Contents
# -*- encoding : utf-8 -*- RSpec.describe Card::Set::Type::Json do it "creates card with valid json" do json = '{"a":"5"}' card = create "a json card", type_id: Card::JsonID, content: json expect(card.content).to eq json end it "rejects invalid json" do invalid_json = "{\"a\":\"5\"\n\"b\":\"4\"}" expect { create "json card", type: :json, content: invalid_json } .to raise_error(/Invalid json unexpected token at/) end end
Version data entries
27 entries across 27 versions & 1 rubygems