Commit 1d90e4d3 authored by Matija Čupić's avatar Matija Čupić

Fix failing variable specs

parent 8bffd85b
......@@ -75,8 +75,8 @@ describe Ci::Build do
subject { job.variables }
context 'when environment specific variable is defined' do
let(:environment_varialbe) do
{ key: 'ENV_KEY', value: 'environment', public: false }
let(:environment_variable) do
{ key: 'ENV_KEY', value: 'environment', public: false, masked: false }
end
before do
......@@ -85,7 +85,7 @@ describe Ci::Build do
variable =
build(:ci_variable,
environment_varialbe.slice(:key, :value)
environment_variable.slice(:key, :value)
.merge(project: project, environment_scope: 'stag*'))
variable.save!
......@@ -96,7 +96,7 @@ describe Ci::Build do
stub_licensed_features(variable_environment_scope: true)
end
it { is_expected.to include(environment_varialbe) }
it { is_expected.to include(environment_variable) }
end
context 'when variable environment scope is not available' do
......@@ -104,12 +104,12 @@ describe Ci::Build do
stub_licensed_features(variable_environment_scope: false)
end
it { is_expected.not_to include(environment_varialbe) }
it { is_expected.not_to include(environment_variable) }
end
context 'when there is a plan for the group' do
it 'GITLAB_FEATURES should include the features for that plan' do
is_expected.to include({ key: 'GITLAB_FEATURES', value: anything, public: true })
is_expected.to include({ key: 'GITLAB_FEATURES', value: anything, public: true, masked: false })
features_variable = subject.find { |v| v[:key] == 'GITLAB_FEATURES' }
expect(features_variable[:value]).to include('multiple_ldap_servers')
end
......
......@@ -46,7 +46,7 @@ describe API::Runner, :clean_gitlab_redis_shared_state do
expect(response).to have_http_status(:created)
expect(json_response).to include(
"id" => build.id,
"variables" => include("key" => 'KEY', "value" => 'value', "public" => true),
"variables" => include("key" => 'KEY', "value" => 'value', "public" => true, "masked" => false),
"image" => a_hash_including("name" => 'ruby'),
"services" => all(a_hash_including("name" => 'mysql')),
"job_info" => a_hash_including("name" => 'terminal', "stage" => 'terminal'))
......
......@@ -38,7 +38,7 @@ describe Ci::ProcessPipelineService, '#execute' do
expect(downstream.ci_pipelines.first).to be_pending
expect(downstream.builds).not_to be_empty
expect(downstream.builds.first.variables)
.to include(key: 'BRIDGE', value: 'cross', public: false)
.to include(key: 'BRIDGE', value: 'cross', public: false, masked: false)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment