Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
41c96c45
Commit
41c96c45
authored
Feb 24, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test with a gpg key with multiple emails
parent
5ce61120
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
16 deletions
+21
-16
spec/features/profiles/gpg_keys_spec.rb
spec/features/profiles/gpg_keys_spec.rb
+2
-2
spec/models/gpg_key_spec.rb
spec/models/gpg_key_spec.rb
+1
-1
spec/support/gpg_helpers.rb
spec/support/gpg_helpers.rb
+18
-13
No files found.
spec/features/profiles/gpg_keys_spec.rb
View file @
41c96c45
...
...
@@ -16,7 +16,7 @@ feature 'Profile > GPG Keys', :gpg do
fill_in
(
'Key'
,
with:
attributes_for
(
:gpg_key
)[
:key
])
click_button
(
'Add key'
)
expect
(
page
).
to
have_content
(
GpgHelpers
::
User1
.
email
)
expect
(
page
).
to
have_content
(
GpgHelpers
::
User1
.
email
s
.
join
)
expect
(
page
).
to
have_content
(
GpgHelpers
::
User1
.
fingerprint
)
end
end
...
...
@@ -25,7 +25,7 @@ feature 'Profile > GPG Keys', :gpg do
create
(
:gpg_key
,
user:
user
)
visit
profile_gpg_keys_path
expect
(
page
).
to
have_content
(
GpgHelpers
::
User1
.
email
)
expect
(
page
).
to
have_content
(
GpgHelpers
::
User1
.
email
s
.
join
)
expect
(
page
).
to
have_content
(
GpgHelpers
::
User1
.
fingerprint
)
end
...
...
spec/models/gpg_key_spec.rb
View file @
41c96c45
...
...
@@ -59,7 +59,7 @@ describe GpgKey do
it
'returns the emails from the gpg key'
do
gpg_key
=
create
:gpg_key
,
key:
GpgHelpers
::
User1
.
public_key
expect
(
gpg_key
.
emails
).
to
eq
[
GpgHelpers
::
User1
.
email
]
expect
(
gpg_key
.
emails
).
to
eq
GpgHelpers
::
User1
.
emails
end
end
end
spec/support/gpg_helpers.rb
View file @
41c96c45
...
...
@@ -98,8 +98,8 @@ module GpgHelpers
'5F7EA3981A5845B141ABD522CCFBE19F00AC8B1D'
end
def
email
'nannie.bernhard@example.com'
def
email
s
[
'nannie.bernhard@example.com'
]
end
end
...
...
@@ -161,15 +161,20 @@ module GpgHelpers
iLgEEwECACIFAliuqioCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEL+d
kl+RHv1lQhsD/0LDi008hCeoZdGMuwy2N5FMUusYg/X1tRQ6E0JcYYjvvE5oIZoX
bVN0yLLD99P0rt6TSlt05CC7RPVPCNpKxKbF+TZMjMJiOi13XmY5Yti77ZMdBZtD
7HeBzjkWCVuR6k8eIwy83niHGI6p6G87Q6XxvDjQ7wdBCNBpwkzmTYIBuI0EWK6q
KgEEAN7mdR1U5xtmWfE6OXQoEBP4DlubIEtRPQGYs+yYDg+5cNK2Hta+Js8LzBwJ
0JhWTQhExid5lSJar+jlziu2F8tHiODySu6+iZDgTh3iHIjpHQwvFdhndcy7rtW5
JwWBstRHDV5FnXoA13c1zVW4VbuazS8IbSJ0HyJJkGhQtorxABEBAAGInwQYAQIA
CQUCWK6qKgIbDAAKCRC/nZJfkR79ZUIIBADVsEMK5U9gRS1lfBcfsJYN9fpnI5E6
tC2lrt6LngJbqEpfd9gek6K7jIeuiaMaUg1OOMdyWwmmf+qaImLOQH3/GXshFZX5
FWkOyFnebKY6V2kuIqAjn5GXqZm07hO0z0FjOIgQLbiH4iRosHKVljPiiB9vNcoX
wnG0c8xS7AlUMQ==
=Erp5
7HeBzjkWCVuR6k8eIwy83niHGI6p6G87Q6XxvDjQ7wdBCNBpwkzmTYIBtC9CZXR0
ZSBDYXJ0d3JpZ2h0IDxiZXR0ZS5jYXJ0d3JpZ2h0QGV4YW1wbGUubmV0Poi4BBMB
AgAiBQJYrwLFAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRC/nZJfkR79
ZVzsBADYe3Hv71I7+lTJDvKOTmV7M4ShOfjEpmDvL/5JB3FzXHAucCOlReCv/6+N
afAspPTc1uys47dvtePwQalroAsd8Y1grn/PCh+Tx27kpn1WG8yZjUsuq3z5rrGR
uXj6g8aeZdqkMTHUVF9Gd+g/5KDODdJbOjwH+l63b/bOiATDFbiNBFiuqioBBADe
5nUdVOcbZlnxOjl0KBAT+A5bmyBLUT0BmLPsmA4PuXDSth7WvibPC8wcCdCYVk0I
RMYneZUiWq/o5c4rthfLR4jg8kruvomQ4E4d4hyI6R0MLxXYZ3XMu67VuScFgbLU
Rw1eRZ16ANd3Nc1VuFW7ms0vCG0idB8iSZBoULaK8QARAQABiJ8EGAECAAkFAliu
qioCGwwACgkQv52SX5Ee/WVCCAQA1bBDCuVPYEUtZXwXH7CWDfX6ZyOROrQtpa7e
i54CW6hKX3fYHpOiu4yHromjGlINTjjHclsJpn/qmiJizkB9/xl7IRWV+RVpDshZ
3mymOldpLiKgI5+Rl6mZtO4TtM9BYziIEC24h+IkaLBylZYz4ogfbzXKF8JxtHPM
UuwJVDE=
=0vYo
-----END PGP PUBLIC KEY BLOCK-----
KEY
end
...
...
@@ -182,8 +187,8 @@ module GpgHelpers
'6D494CA6FC90C0CAE0910E42BF9D925F911EFD65'
end
def
email
'bette.cartwright@example.com'
def
email
s
[
'bette.cartwright@example.com'
,
'bette.cartwright@example.net'
]
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment