diff options
| author | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-07 18:18:22 +0000 |
|---|---|---|
| committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-07-07 18:18:22 +0000 |
| commit | b151951418bda31e3acdfe1dcb214b4d244f8566 (patch) | |
| tree | 854869d47bec521baba35849a71397f2f323023b /spec/requests/api | |
| parent | 3ba7c004445d436f616814bf278fb60ffc9fc592 (diff) | |
| parent | 8b33e654c09aaa20545e7c246585fa2d3217cecb (diff) | |
| download | gitlab-ce-b151951418bda31e3acdfe1dcb214b4d244f8566.tar.gz | |
Merge branch '33929-allow-to-enable-perf-bar-for-a-group' into 'master'
Allow to enable the performance bar per user or Feature group
Closes #33929 and #34528
See merge request !12362
Diffstat (limited to 'spec/requests/api')
| -rw-r--r-- | spec/requests/api/features_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/requests/api/features_spec.rb b/spec/requests/api/features_spec.rb index 1d8aaeea8f2..7e21006b254 100644 --- a/spec/requests/api/features_spec.rb +++ b/spec/requests/api/features_spec.rb @@ -113,6 +113,20 @@ describe API::Features do { 'key' => 'actors', 'value' => ["User:#{user.id}"] } ]) end + + it 'creates an enabled feature for the given user and feature group when passed user=username and feature_group=perf_team' do + post api("/features/#{feature_name}", admin), value: 'true', user: user.username, feature_group: 'perf_team' + + expect(response).to have_http_status(201) + expect(json_response).to eq( + 'name' => 'my_feature', + 'state' => 'conditional', + 'gates' => [ + { 'key' => 'boolean', 'value' => false }, + { 'key' => 'groups', 'value' => ['perf_team'] }, + { 'key' => 'actors', 'value' => ["User:#{user.id}"] } + ]) + end end it 'creates a feature with the given percentage if passed an integer' do |
