diff options
author | Matija Čupić <matteeyah@gmail.com> | 2019-02-26 14:03:42 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2019-02-26 14:03:42 +0000 |
commit | c9125c4786970fc3c3745c7ea7bff45ef7a62e7d (patch) | |
tree | 38bd564113590665646b974dcbdf91f51b3a4b88 /spec/requests/api/variables_spec.rb | |
parent | c1d8f8a41042ac7abb2916206e8a411e82af442e (diff) | |
download | gitlab-ce-c9125c4786970fc3c3745c7ea7bff45ef7a62e7d.tar.gz |
Add Maskable concern for CI variables
This adds a concern that abstracts the concept of masking a variable,
including the RegEx for validation.
Diffstat (limited to 'spec/requests/api/variables_spec.rb')
-rw-r--r-- | spec/requests/api/variables_spec.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/spec/requests/api/variables_spec.rb b/spec/requests/api/variables_spec.rb index cdac5b2f400..5df6baf0ddf 100644 --- a/spec/requests/api/variables_spec.rb +++ b/spec/requests/api/variables_spec.rb @@ -73,12 +73,12 @@ describe API::Variables do context 'authorized user with proper permissions' do it 'creates variable' do expect do - post api("/projects/#{project.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'VALUE_2', protected: true } + post api("/projects/#{project.id}/variables", user), params: { key: 'TEST_VARIABLE_2', value: 'PROTECTED_VALUE_2', protected: true } end.to change {project.variables.count}.by(1) expect(response).to have_gitlab_http_status(201) expect(json_response['key']).to eq('TEST_VARIABLE_2') - expect(json_response['value']).to eq('VALUE_2') + expect(json_response['value']).to eq('PROTECTED_VALUE_2') expect(json_response['protected']).to be_truthy end |