diff options
author | Robert Speicher <robert@gitlab.com> | 2017-06-29 19:36:22 +0300 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-06-29 19:36:22 +0300 |
commit | 066a6c8ba8900f0883ee788d901d300850b1ae61 (patch) | |
tree | d84020e3dbf166a993b9aaad06dbe188e429750c /spec/models/concerns | |
parent | 5a983ac431affc800d5e9db9e83c14710ec29c36 (diff) | |
parent | 289fae78e971e117e69fb87602f5f6284419b863 (diff) |
Merge branch '34078-allow-to-enable-feature-flags-with-more-granularity' into 'master'
Allow the feature flags to be enabled/disabled with more granularity
Closes #34078
See merge request !12357
Diffstat (limited to 'spec/models/concerns')
-rw-r--r-- | spec/models/concerns/feature_gate_spec.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/models/concerns/feature_gate_spec.rb b/spec/models/concerns/feature_gate_spec.rb new file mode 100644 index 00000000000..3f601243245 --- /dev/null +++ b/spec/models/concerns/feature_gate_spec.rb @@ -0,0 +1,19 @@ +require 'spec_helper' + +describe FeatureGate do + describe 'User' do + describe '#flipper_id' do + context 'when user is not persisted' do + let(:user) { build(:user) } + + it { expect(user.flipper_id).to be_nil } + end + + context 'when user is persisted' do + let(:user) { create(:user) } + + it { expect(user.flipper_id).to eq "User:#{user.id}" } + end + end + end +end |