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
322402aa
Commit
322402aa
authored
Jan 18, 2019
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more tests and comments around Wiki formatting
parent
b103f614
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
lib/gitlab/shell.rb
lib/gitlab/shell.rb
+1
-0
spec/lib/gitlab/bitbucket_import/wiki_formatter_spec.rb
spec/lib/gitlab/bitbucket_import/wiki_formatter_spec.rb
+29
-0
spec/lib/gitlab/legacy_github_import/wiki_formatter_spec.rb
spec/lib/gitlab/legacy_github_import/wiki_formatter_spec.rb
+7
-1
No files found.
lib/gitlab/shell.rb
View file @
322402aa
...
...
@@ -64,6 +64,7 @@ module Gitlab
end
end
# Convenience methods for initializing a new repository with a Project model.
def
create_project_repository
(
project
)
create_repository
(
project
.
repository_storage
,
project
.
disk_path
,
project
.
full_path
)
end
...
...
spec/lib/gitlab/bitbucket_import/wiki_formatter_spec.rb
0 → 100644
View file @
322402aa
require
'spec_helper'
describe
Gitlab
::
BitbucketImport
::
WikiFormatter
do
let
(
:project
)
do
create
(
:project
,
namespace:
create
(
:namespace
,
path:
'gitlabhq'
),
import_url:
'https://xxx@bitbucket.org/gitlabhq/sample.gitlabhq.git'
)
end
subject
(
:wiki
)
{
described_class
.
new
(
project
)
}
describe
'#disk_path'
do
it
'appends .wiki to disk path'
do
expect
(
wiki
.
disk_path
).
to
eq
project
.
wiki
.
disk_path
end
end
describe
'#full_path'
do
it
'appends .wiki to project path'
do
expect
(
wiki
.
full_path
).
to
eq
project
.
wiki
.
full_path
end
end
describe
'#import_url'
do
it
'returns URL of the wiki repository'
do
expect
(
wiki
.
import_url
).
to
eq
'https://xxx@bitbucket.org/gitlabhq/sample.gitlabhq.git/wiki'
end
end
end
spec/lib/gitlab/legacy_github_import/wiki_formatter_spec.rb
View file @
322402aa
...
...
@@ -10,11 +10,17 @@ describe Gitlab::LegacyGithubImport::WikiFormatter do
subject
(
:wiki
)
{
described_class
.
new
(
project
)
}
describe
'#disk_path'
do
it
'appends .wiki to
project
path'
do
it
'appends .wiki to
disk
path'
do
expect
(
wiki
.
disk_path
).
to
eq
project
.
wiki
.
disk_path
end
end
describe
'#full_path'
do
it
'appends .wiki to project path'
do
expect
(
wiki
.
full_path
).
to
eq
project
.
wiki
.
full_path
end
end
describe
'#import_url'
do
it
'returns URL of the wiki repository'
do
expect
(
wiki
.
import_url
).
to
eq
'https://xxx@github.com/gitlabhq/sample.gitlabhq.wiki.git'
...
...
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