Sha256: 25c1f21c59ecfcbeca822c27d56283866f91b0735a7a52799442d252b8dc10f8

Contents?: true

Size: 401 Bytes

Versions: 10

Compression:

Stored size: 401 Bytes

Contents

require 'flipper/serializers/json'

RSpec.describe Flipper::Serializers::Json do
  it "serializes and deserializes" do
    serialized = described_class.serialize("my data")
    expect(described_class.deserialize(serialized)).to eq("my data")
  end

  it "doesn't fail with nil" do
    expect(described_class.serialize(nil)).to be(nil)
    expect(described_class.deserialize(nil)).to be(nil)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
flipper-1.3.2 spec/flipper/serializers/json_spec.rb
flipper-1.3.1 spec/flipper/serializers/json_spec.rb
flipper-1.3.0 spec/flipper/serializers/json_spec.rb
flipper-1.3.0.pre spec/flipper/serializers/json_spec.rb
flipper-1.2.2 spec/flipper/serializers/json_spec.rb
flipper-1.2.1 spec/flipper/serializers/json_spec.rb
flipper-1.2.0 spec/flipper/serializers/json_spec.rb
flipper-1.1.2 spec/flipper/serializers/json_spec.rb
flipper-1.1.1 spec/flipper/serializers/json_spec.rb
flipper-1.1.0 spec/flipper/serializers/json_spec.rb