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
c0024233
Commit
c0024233
authored
Jul 21, 2020
by
Paul Slaughter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fixtures used in mock_server
These are the ones needed to support the IDE starting up.
parent
79de7066
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
106 additions
and
0 deletions
+106
-0
spec/frontend/fixtures/api_merge_requests.rb
spec/frontend/fixtures/api_merge_requests.rb
+24
-0
spec/frontend/fixtures/api_projects.rb
spec/frontend/fixtures/api_projects.rb
+35
-0
spec/frontend/fixtures/projects_json.rb
spec/frontend/fixtures/projects_json.rb
+47
-0
No files found.
spec/frontend/fixtures/api_merge_requests.rb
0 → 100644
View file @
c0024233
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
API
::
MergeRequests
,
'(JavaScript fixtures)'
,
type: :request
do
include
ApiHelpers
include
JavaScriptFixturesHelpers
let
(
:admin
)
{
create
(
:admin
,
name:
'root'
)
}
let
(
:namespace
)
{
create
(
:namespace
,
name:
'gitlab-test'
)}
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
namespace
,
path:
'lorem-ipsum'
)
}
before
(
:all
)
do
clean_frontend_fixtures
(
'api/merge_requests'
)
end
it
'api/merge_requests/get.json'
do
4
.
times
{
|
i
|
create
(
:merge_request
,
source_project:
project
,
source_branch:
"branch-
#{
i
}
"
)
}
get
api
(
"/projects/
#{
project
.
id
}
/merge_requests"
,
admin
)
expect
(
response
).
to
be_successful
end
end
spec/frontend/fixtures/api_projects.rb
0 → 100644
View file @
c0024233
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
API
::
Projects
,
'(JavaScript fixtures)'
,
type: :request
do
include
ApiHelpers
include
JavaScriptFixturesHelpers
let
(
:admin
)
{
create
(
:admin
,
name:
'root'
)
}
let
(
:namespace
)
{
create
(
:namespace
,
name:
'gitlab-test'
)}
let
(
:project
)
{
create
(
:project
,
:repository
,
namespace:
namespace
,
path:
'lorem-ipsum'
)
}
let
(
:project_empty
)
{
create
(
:project_empty_repo
,
namespace:
namespace
,
path:
'lorem-ipsum-empty'
)
}
before
(
:all
)
do
clean_frontend_fixtures
(
'api/projects'
)
end
it
'api/projects/get.json'
do
get
api
(
"/projects/
#{
project
.
id
}
"
,
admin
)
expect
(
response
).
to
be_successful
end
it
'api/projects/get_empty.json'
do
get
api
(
"/projects/
#{
project_empty
.
id
}
"
,
admin
)
expect
(
response
).
to
be_successful
end
it
'api/projects/branches/get.json'
do
get
api
(
"/projects/
#{
project
.
id
}
/repository/branches/
#{
project
.
default_branch
}
"
,
admin
)
expect
(
response
).
to
be_successful
end
end
spec/frontend/fixtures/projects_json.rb
0 → 100644
View file @
c0024233
# frozen_string_literal: true
require
'spec_helper'
RSpec
.
describe
'Projects JSON endpoints (JavaScript fixtures)'
,
type: :controller
do
include
JavaScriptFixturesHelpers
let
(
:admin
)
{
create
(
:admin
,
name:
'root'
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
before
(
:all
)
do
clean_frontend_fixtures
(
'projects_json/'
)
end
before
do
project
.
add_maintainer
(
admin
)
sign_in
(
admin
)
end
describe
Projects
::
FindFileController
,
'(JavaScript fixtures)'
,
type: :controller
do
it
'projects_json/files.json'
do
get
:list
,
params:
{
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
id:
project
.
default_branch
},
format:
'json'
expect
(
response
).
to
be_successful
end
end
describe
Projects
::
CommitController
,
'(JavaScript fixtures)'
,
type: :controller
do
it
'projects_json/pipelines_empty.json'
do
get
:pipelines
,
params:
{
namespace_id:
project
.
namespace
.
to_param
,
project_id:
project
,
id:
project
.
commit
(
project
.
default_branch
).
id
,
format:
'json'
}
expect
(
response
).
to
be_successful
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