debian-mirror-gitlab/spec/lib/gitlab/serializer/ci/variables_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
515 B
Ruby
Raw Normal View History

2019-12-04 20:38:33 +05:30
# frozen_string_literal: true
2018-11-18 11:00:15 +05:30
require 'fast_spec_helper'
2017-08-17 22:00:37 +05:30
2020-07-28 23:09:34 +05:30
RSpec.describe Gitlab::Serializer::Ci::Variables do
2017-08-17 22:00:37 +05:30
subject do
described_class.load(described_class.dump(object))
end
let(:object) do
2018-11-18 11:00:15 +05:30
[{ 'key' => :key, 'value' => 'value', 'public' => true },
2017-08-17 22:00:37 +05:30
{ key: 'wee', value: 1, public: false }]
end
2018-11-18 11:00:15 +05:30
it 'converts keys into strings and symbolizes hash' do
2017-08-17 22:00:37 +05:30
is_expected.to eq([
{ key: 'key', value: 'value', public: true },
{ key: 'wee', value: 1, public: false }
])
end
end