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
da8fd03c
Commit
da8fd03c
authored
Mar 26, 2020
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add "Keep divergent refs" feature spec
parent
f715c41d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
spec/features/projects/settings/repository_settings_spec.rb
spec/features/projects/settings/repository_settings_spec.rb
+29
-0
No files found.
spec/features/projects/settings/repository_settings_spec.rb
View file @
da8fd03c
...
...
@@ -72,6 +72,21 @@ describe 'Projects > Settings > Repository settings' do
expect
(
project
.
remote_mirrors
.
first
.
only_protected_branches
).
to
eq
(
true
)
end
it
'creates a push mirror that keeps divergent refs'
,
:js
do
select_direction
fill_in
'url'
,
with:
'ssh://user@localhost/project.git'
fill_in
'Password'
,
with:
'password'
check
'Keep divergent refs'
Sidekiq
::
Testing
.
fake!
do
click_button
'Mirror repository'
end
expect
(
page
).
to
have_content
(
'Mirroring settings were successfully updated'
)
expect
(
project
.
reload
.
remote_mirrors
.
first
.
keep_divergent_refs
).
to
eq
(
true
)
end
it
'generates an SSH public key on submission'
,
:js
do
fill_in
'url'
,
with:
'ssh://user@localhost/project.git'
select
'SSH public key'
,
from:
'Authentication method'
...
...
@@ -110,6 +125,20 @@ describe 'Projects > Settings > Repository settings' do
end
end
# Removal: https://gitlab.com/gitlab-org/gitlab/-/issues/208828
context
'with the `keep_divergent_refs` feature flag disabled'
do
before
do
stub_feature_flags
(
keep_divergent_refs:
{
enabled:
false
,
thing:
project
})
end
it
'hides the "Keep divergent refs" option'
do
visit
project_settings_repository_path
(
project
)
expect
(
page
).
not_to
have_selector
(
'#keep_divergent_refs'
)
expect
(
page
).
not_to
have_text
(
'Keep divergent refs'
)
end
end
context
'repository cleanup settings'
do
let
(
:object_map_file
)
{
Rails
.
root
.
join
(
'spec'
,
'fixtures'
,
'bfg_object_map.txt'
)
}
...
...
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