gitlab-org--gitlab-foss/spec/models/concerns/feature_gate_spec.rb
Rémy Coutable 5fa9d6a17d Rename FLippable to FeatureGate and make flipper_group and user mutually exclusive
Signed-off-by: Rémy Coutable <remy@rymai.me>
2017-06-27 18:59:51 +02:00

19 lines
412 B
Ruby

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