Commit d9fd3709 authored by Alexis Reigel's avatar Alexis Reigel

use hash instead of 2d array

parent 075dae65
......@@ -47,7 +47,7 @@ class GpgKey < ActiveRecord::Base
email,
email == user.email
]
end
end.to_h
end
def verified?
......
......@@ -58,10 +58,10 @@ describe GpgKey do
user = create :user, email: 'bette.cartwright@example.com'
gpg_key = create :gpg_key, key: GpgHelpers::User2.public_key, user: user
expect(gpg_key.emails_with_verified_status).to match_array [
['bette.cartwright@example.com', true],
['bette.cartwright@example.net', false]
]
expect(gpg_key.emails_with_verified_status).to eq(
'bette.cartwright@example.com' => true,
'bette.cartwright@example.net' => false
)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment