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
Tatuya Kamada
gitlab-ce
Commits
7085850c
Commit
7085850c
authored
Mar 04, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix specs
parent
c2b33d3b
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
7 deletions
+16
-7
app/models/project_import_data.rb
app/models/project_import_data.rb
+1
-2
lib/gitlab/import_url_exposer.rb
lib/gitlab/import_url_exposer.rb
+1
-1
spec/factories/project_import_data.rb
spec/factories/project_import_data.rb
+5
-0
spec/lib/gitlab/github_import/project_creator_spec.rb
spec/lib/gitlab/github_import/project_creator_spec.rb
+2
-2
spec/lib/gitlab/github_import/wiki_formatter_spec.rb
spec/lib/gitlab/github_import/wiki_formatter_spec.rb
+7
-2
No files found.
app/models/project_import_data.rb
View file @
7085850c
...
...
@@ -12,8 +12,7 @@ require 'file_size_validator'
class
ProjectImportData
<
ActiveRecord
::
Base
belongs_to
:project
attr_encrypted
:credentials
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
serialize
:credentials
,
JSON
attr_encrypted
:credentials
,
key:
Gitlab
::
Application
.
secrets
.
db_key_base
,
marshal:
true
serialize
:data
,
JSON
...
...
lib/gitlab/import_url_exposer.rb
View file @
7085850c
...
...
@@ -14,4 +14,4 @@ module Gitlab
credentials
.
values
.
join
(
":"
)
end
end
end
\ No newline at end of file
end
spec/factories/project_import_data.rb
0 → 100644
View file @
7085850c
FactoryGirl
.
define
do
factory
:project_import_data
,
class:
ProjectImportData
do
data
"test"
end
end
\ No newline at end of file
spec/lib/gitlab/github_import/project_creator_spec.rb
View file @
7085850c
...
...
@@ -12,7 +12,7 @@ describe Gitlab::GithubImport::ProjectCreator, lib: true do
owner:
OpenStruct
.
new
(
login:
"john"
)
)
end
let
(
:namespace
){
create
(
:group
,
owner:
user
)
}
let
(
:namespace
)
{
create
(
:group
,
owner:
user
)
}
let
(
:token
)
{
"asdffg"
}
let
(
:access_params
)
{
{
github_access_token:
token
}
}
...
...
@@ -27,7 +27,7 @@ describe Gitlab::GithubImport::ProjectCreator, lib: true do
project
=
project_creator
.
execute
expect
(
project
.
import_url
).
to
eq
(
"https://gitlab.com/asd/vim.git"
)
expect
(
project
.
import_data
.
credentials
).
to
eq
(
"asdffg"
)
expect
(
project
.
import_data
.
credentials
).
to
eq
(
:github_access_token
=>
"asdffg"
)
expect
(
project
.
visibility_level
).
to
eq
(
Gitlab
::
VisibilityLevel
::
PRIVATE
)
end
end
spec/lib/gitlab/github_import/wiki_formatter_spec.rb
View file @
7085850c
...
...
@@ -3,10 +3,15 @@ require 'spec_helper'
describe
Gitlab
::
GithubImport
::
WikiFormatter
,
lib:
true
do
let
(
:project
)
do
create
(
:project
,
namespace:
create
(
:namespace
,
path:
'gitlabhq'
),
import_url:
'https://xxx@
github.com/gitlabhq/sample.gitlabhq.git'
)
import_url:
'https://
github.com/gitlabhq/sample.gitlabhq.git'
)
end
subject
(
:wiki
)
{
described_class
.
new
(
project
)}
let!
(
:project_import_data
)
do
create
(
:project_import_data
,
credentials:
{
github_access_token:
'xxx'
},
project:
project
)
end
subject
(
:wiki
)
{
described_class
.
new
(
project
)
}
describe
'#path_with_namespace'
do
it
'appends .wiki to project path'
do
...
...
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