Skip to content

Commit

Permalink
use email address for unique-ish id for feature toggles (#3323)
Browse files Browse the repository at this point in the history
* use email address for unique-ish id for feature toggles
* no need for user prefix any more
  • Loading branch information
annaswims authored and Johnny Holton committed Sep 23, 2019
1 parent 62ba07d commit 7464964
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ def power_of_attorney
end

def flipper_id
"User;#{account_uuid}"
email || account_uuid
end

private
Expand Down
7 changes: 7 additions & 0 deletions spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@
end
end

describe '#flipper_id' do
let(:user) { build(:user, :loa3) }
it 'should return a unique identifier of email' do
expect(user.flipper_id).to eq(user.email)
end
end

describe '#va_patient?' do
let(:user) { build(:user, :loa3) }

Expand Down

0 comments on commit 7464964

Please sign in to comment.