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
1fbe7ca5
Commit
1fbe7ca5
authored
Jun 19, 2018
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE-EE parity for Platform feature specs
parent
98c44525
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
16 deletions
+28
-16
ee/spec/features/users/login_spec.rb
ee/spec/features/users/login_spec.rb
+28
-0
spec/features/profiles/user_visits_profile_preferences_page_spec.rb
...res/profiles/user_visits_profile_preferences_page_spec.rb
+0
-2
spec/features/users/login_spec.rb
spec/features/users/login_spec.rb
+0
-14
No files found.
ee/spec/features/users/login_spec.rb
0 → 100644
View file @
1fbe7ca5
require
'spec_helper'
feature
'Login'
do
before
do
stub_licensed_features
(
extended_audit_events:
true
)
end
it
'creates a security event for an invalid password login'
do
user
=
create
(
:user
,
password:
'not-the-default'
)
expect
{
gitlab_sign_in
(
user
)
}
.
to
change
{
SecurityEvent
.
where
(
entity_id:
-
1
).
count
}.
from
(
0
).
to
(
1
)
end
it
'creates a security event for an invalid OAuth login'
do
stub_omniauth_saml_config
(
enabled:
true
,
auto_link_saml_user:
false
,
allow_single_sign_on:
[
'saml'
],
providers:
[
mock_saml_config
]
)
user
=
create
(
:omniauth_user
,
:two_factor
,
extern_uid:
'my-uid'
,
provider:
'saml'
)
expect
{
gitlab_sign_in_via
(
'saml'
,
user
,
'wrong-uid'
)
}
.
to
change
{
SecurityEvent
.
where
(
entity_id:
-
1
).
count
}.
from
(
0
).
to
(
1
)
end
end
spec/features/profiles/user_visits_profile_preferences_page_spec.rb
View file @
1fbe7ca5
...
...
@@ -4,8 +4,6 @@ describe 'User visits the profile preferences page' do
let
(
:user
)
{
create
(
:user
)
}
before
do
stub_licensed_features
(
ide:
true
)
sign_in
(
user
)
visit
(
profile_preferences_path
)
...
...
spec/features/users/login_spec.rb
View file @
1fbe7ca5
...
...
@@ -186,16 +186,6 @@ feature 'Login' do
enter_code
(
user
.
current_otp
)
expect
(
current_path
).
to
eq
root_path
end
it
'creates a security event after failed OAuth login'
do
stub_omniauth_saml_config
(
enabled:
true
,
auto_link_saml_user:
false
,
allow_single_sign_on:
[
'saml'
],
providers:
[
mock_saml_config
])
stub_licensed_features
(
extended_audit_events:
true
)
user
=
create
(
:omniauth_user
,
:two_factor
,
extern_uid:
'my-uid'
,
provider:
'saml'
)
gitlab_sign_in_via
(
'saml'
,
user
,
'wrong-uid'
)
expect
(
SecurityEvent
.
where
(
entity_id:
-
1
).
count
).
to
eq
(
1
)
end
end
end
...
...
@@ -213,14 +203,10 @@ feature 'Login' do
end
it
'blocks invalid login'
do
stub_licensed_features
(
extended_audit_events:
true
)
user
=
create
(
:user
,
password:
'not-the-default'
)
gitlab_sign_in
(
user
)
expect
(
page
).
to
have_content
(
'Invalid Login or password.'
)
expect
(
SecurityEvent
.
where
(
entity_id:
-
1
).
count
).
to
eq
(
1
)
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