Welcome to mirror list, hosted at ThFree Co, Russian Federation.

variables_spec.rb « ci « serializer « gitlab « lib « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 9b0475259fe8f2956a0e15be8d67acdff09ccfa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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