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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
62ee2ccf
Commit
62ee2ccf
authored
Dec 22, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactoring spec for Gitlab::BareRepositoryImport::Repository
parent
6c95c771
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
spec/lib/gitlab/bare_repository_import/repository_spec.rb
spec/lib/gitlab/bare_repository_import/repository_spec.rb
+11
-6
No files found.
spec/lib/gitlab/bare_repository_import/repository_spec.rb
View file @
62ee2ccf
...
@@ -39,15 +39,14 @@ describe ::Gitlab::BareRepositoryImport::Repository do
...
@@ -39,15 +39,14 @@ describe ::Gitlab::BareRepositoryImport::Repository do
end
end
describe
'#project_full_path'
do
describe
'#project_full_path'
do
it
'returns the project full path'
do
it
'returns the project full path with trailing slash in the root path'
do
expect
(
subject
.
repo_path
).
to
eq
(
'/full/path/to/repo.git'
)
expect
(
subject
.
project_full_path
).
to
eq
(
'to/repo'
)
expect
(
subject
.
project_full_path
).
to
eq
(
'to/repo'
)
end
end
it
'with no trailing slash in the root path'
do
it
'
returns the project full path
with no trailing slash in the root path'
do
repo_path
=
described_class
.
new
(
'/full/path'
,
'/full/path/to/repo.git'
)
subject
=
described_class
.
new
(
'/full/path'
,
'/full/path/to/repo.git'
)
expect
(
repo_path
.
project_full_path
).
to
eq
(
'to/repo'
)
expect
(
subject
.
project_full_path
).
to
eq
(
'to/repo'
)
end
end
end
end
end
end
...
@@ -109,7 +108,13 @@ describe ::Gitlab::BareRepositoryImport::Repository do
...
@@ -109,7 +108,13 @@ describe ::Gitlab::BareRepositoryImport::Repository do
end
end
describe
'#project_full_path'
do
describe
'#project_full_path'
do
it
'returns the project full path'
do
it
'returns the project full path with trailing slash in the root path'
do
expect
(
subject
.
project_full_path
).
to
eq
(
'to/repo'
)
end
it
'returns the project full path with no trailing slash in the root path'
do
subject
=
described_class
.
new
(
root_path
[
0
...-
1
],
repo_path
)
expect
(
subject
.
project_full_path
).
to
eq
(
'to/repo'
)
expect
(
subject
.
project_full_path
).
to
eq
(
'to/repo'
)
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