2016-12-14 09:38:40 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
2017-02-06 08:34:10 -05:00
|
|
|
describe Gitlab::Serializer::Ci::Variables do
|
2016-12-14 09:38:40 -05:00
|
|
|
subject do
|
2016-12-16 09:49:33 -05:00
|
|
|
described_class.load(described_class.dump(object))
|
2016-12-14 09:38:40 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
let(:object) do
|
|
|
|
[{ key: :key, value: 'value', public: true },
|
|
|
|
{ key: 'wee', value: 1, public: false }]
|
|
|
|
end
|
|
|
|
|
2016-12-19 10:32:09 -05:00
|
|
|
it 'converts keys into strings' do
|
2016-12-14 09:38:40 -05:00
|
|
|
is_expected.to eq([
|
|
|
|
{ key: 'key', value: 'value', public: true },
|
2017-02-22 12:35:20 -05:00
|
|
|
{ key: 'wee', value: 1, public: false }
|
|
|
|
])
|
2016-12-14 09:38:40 -05:00
|
|
|
end
|
|
|
|
end
|