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
Boxiang Sun
gitlab-ce
Commits
ae6b48d2
Commit
ae6b48d2
authored
Jul 28, 2018
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing spec in spec/lib/bitbucket_server/client_spec.rb
parent
59ef3f98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
spec/lib/bitbucket_server/client_spec.rb
spec/lib/bitbucket_server/client_spec.rb
+4
-3
No files found.
spec/lib/bitbucket_server/client_spec.rb
View file @
ae6b48d2
...
...
@@ -4,6 +4,7 @@ describe BitbucketServer::Client do
let
(
:options
)
{
{
base_uri:
'https://test:7990'
,
user:
'bitbucket'
,
password:
'mypassword'
}
}
let
(
:project
)
{
'SOME-PROJECT'
}
let
(
:repo_slug
)
{
'my-repo'
}
let
(
:headers
)
{
{
"Content-Type"
=>
"application/json"
}
}
subject
{
described_class
.
new
(
options
)
}
...
...
@@ -38,7 +39,7 @@ describe BitbucketServer::Client do
let
(
:url
)
{
"https://test:7990/rest/api/1.0/projects/SOME-PROJECT/repos/my-repo"
}
it
'requests a specific repository'
do
stub_request
(
:get
,
url
)
stub_request
(
:get
,
url
)
.
to_return
(
status:
200
,
headers:
headers
,
body:
'{}'
)
subject
.
repo
(
project
,
repo_slug
)
...
...
@@ -62,7 +63,7 @@ describe BitbucketServer::Client do
let
(
:url
)
{
'https://test:7990/rest/api/1.0/projects/SOME-PROJECT/repos/my-repo/branches'
}
it
'requests Bitbucket to create a branch'
do
stub_request
(
:post
,
url
)
stub_request
(
:post
,
url
)
.
to_return
(
status:
204
,
headers:
headers
,
body:
'{}'
)
subject
.
create_branch
(
project
,
repo_slug
,
branch
,
sha
)
...
...
@@ -76,7 +77,7 @@ describe BitbucketServer::Client do
let
(
:url
)
{
'https://test:7990/rest/branch-utils/1.0/projects/SOME-PROJECT/repos/my-repo/branches'
}
it
'requests Bitbucket to create a branch'
do
stub_request
(
:delete
,
url
)
stub_request
(
:delete
,
url
)
.
to_return
(
status:
204
,
headers:
headers
,
body:
'{}'
)
subject
.
delete_branch
(
project
,
repo_slug
,
branch
,
sha
)
...
...
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