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
3ac5e9eb
Commit
3ac5e9eb
authored
Mar 29, 2017
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve specs examples
parent
3c75ee28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
spec/lib/gitlab/github_import/pull_request_formatter_spec.rb
spec/lib/gitlab/github_import/pull_request_formatter_spec.rb
+3
-3
No files found.
spec/lib/gitlab/github_import/pull_request_formatter_spec.rb
View file @
3ac5e9eb
...
@@ -206,7 +206,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
...
@@ -206,7 +206,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
context
'when source branch does not exist'
do
context
'when source branch does not exist'
do
let
(
:raw_data
)
{
double
(
base_data
.
merge
(
head:
removed_branch
))
}
let
(
:raw_data
)
{
double
(
base_data
.
merge
(
head:
removed_branch
))
}
it
'prefixes branch name with to avoid collision'
do
it
'prefixes branch name with
gh-:short_sha/:number/:user pattern
to avoid collision'
do
expect
(
pull_request
.
source_branch_name
).
to
eq
"gh-
#{
target_short_sha
}
/1347/octocat/removed-branch"
expect
(
pull_request
.
source_branch_name
).
to
eq
"gh-
#{
target_short_sha
}
/1347/octocat/removed-branch"
end
end
end
end
...
@@ -214,7 +214,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
...
@@ -214,7 +214,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
context
'when source branch is from a fork'
do
context
'when source branch is from a fork'
do
let
(
:raw_data
)
{
double
(
base_data
.
merge
(
head:
forked_branch
))
}
let
(
:raw_data
)
{
double
(
base_data
.
merge
(
head:
forked_branch
))
}
it
'prefixes branch name with to avoid collision'
do
it
'prefixes branch name with
gh-:short_sha/:number/:user pattern
to avoid collision'
do
expect
(
pull_request
.
source_branch_name
).
to
eq
"gh-
#{
target_short_sha
}
/1347/octocat/master"
expect
(
pull_request
.
source_branch_name
).
to
eq
"gh-
#{
target_short_sha
}
/1347/octocat/master"
end
end
end
end
...
@@ -222,7 +222,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
...
@@ -222,7 +222,7 @@ describe Gitlab::GithubImport::PullRequestFormatter, lib: true do
context
'when source branch is from a deleted fork'
do
context
'when source branch is from a deleted fork'
do
let
(
:raw_data
)
{
double
(
base_data
.
merge
(
head:
branch_deleted_repo
))
}
let
(
:raw_data
)
{
double
(
base_data
.
merge
(
head:
branch_deleted_repo
))
}
it
'prefixes branch name with to avoid collision'
do
it
'prefixes branch name with
gh-:short_sha/:number/:user pattern
to avoid collision'
do
expect
(
pull_request
.
source_branch_name
).
to
eq
"gh-
#{
target_short_sha
}
/1347/octocat/master"
expect
(
pull_request
.
source_branch_name
).
to
eq
"gh-
#{
target_short_sha
}
/1347/octocat/master"
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