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
2af3400c
Commit
2af3400c
authored
Dec 21, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add spec for Project#write_repository_config
parent
fcb967ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+22
-0
No files found.
spec/models/project_spec.rb
View file @
2af3400c
...
@@ -3155,4 +3155,26 @@ describe Project do
...
@@ -3155,4 +3155,26 @@ describe Project do
it
{
is_expected
.
to
eq
(
platform_kubernetes
)
}
it
{
is_expected
.
to
eq
(
platform_kubernetes
)
}
end
end
end
end
describe
'#write_repository_config'
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
it
'writes full path in .git/config when key is missing'
do
project
.
write_repository_config
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
end
it
'updates full path in .git/config when key is present'
do
project
.
write_repository_config
(
gl_full_path:
'old/path'
)
expect
{
project
.
write_repository_config
}.
to
change
{
project
.
repo
.
config
[
'gitlab.fullpath'
]
}.
from
(
'old/path'
).
to
(
project
.
full_path
)
end
it
'does not raise an error with an empty repository'
do
project
=
create
(
:project_empty_repo
)
expect
{
project
.
write_repository_config
}.
not_to
raise_error
end
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