Commit d9fd3709 authored by Alexis Reigel's avatar Alexis Reigel
Browse files

use hash instead of 2d array

parent e6dd97d64b99
......@@ -47,7 +47,7 @@ def emails_with_verified_status
email,
email == user.email
]
end
end.to_h
end
def verified?
......
......@@ -58,10 +58,10 @@
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