debian-mirror-gitlab/spec/lib/gitlab/serializer/ci/variables_spec.rb
2022-11-25 23:54:43 +05:30

22 lines
528 B
Ruby

# frozen_string_literal: true
require 'fast_spec_helper'
RSpec.describe Gitlab::Serializer::Ci::Variables do
subject do
described_class.load(described_class.dump(object))
end
let(:object) do
[{ 'key' => :key, 'value' => 'value', 'public' => true },
{ key: 'wee', value: 1, public: false }]
end
it 'converts keys into strings and symbolizes hash' do
is_expected.to eq(
[
{ key: 'key', value: 'value', public: true },
{ key: 'wee', value: 1, public: false }
])
end
end