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
b1222ebc
Commit
b1222ebc
authored
Mar 27, 2017
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `:empty_project` where possible in serializer specs
parent
90e802cd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
11 deletions
+10
-11
spec/serializers/analytics_issue_serializer_spec.rb
spec/serializers/analytics_issue_serializer_spec.rb
+1
-1
spec/serializers/analytics_merge_request_serializer_spec.rb
spec/serializers/analytics_merge_request_serializer_spec.rb
+1
-1
spec/serializers/commit_entity_spec.rb
spec/serializers/commit_entity_spec.rb
+1
-1
spec/serializers/environment_serializer_spec.rb
spec/serializers/environment_serializer_spec.rb
+7
-8
No files found.
spec/serializers/analytics_issue_serializer_spec.rb
View file @
b1222ebc
...
@@ -8,7 +8,7 @@ describe AnalyticsIssueSerializer do
...
@@ -8,7 +8,7 @@ describe AnalyticsIssueSerializer do
end
end
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:resource
)
do
let
(
:resource
)
do
{
{
total_time:
"172802.724419"
,
total_time:
"172802.724419"
,
...
...
spec/serializers/analytics_merge_request_serializer_spec.rb
View file @
b1222ebc
...
@@ -8,7 +8,7 @@ describe AnalyticsMergeRequestSerializer do
...
@@ -8,7 +8,7 @@ describe AnalyticsMergeRequestSerializer do
end
end
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:resource
)
do
let
(
:resource
)
do
{
{
total_time:
"172802.724419"
,
total_time:
"172802.724419"
,
...
...
spec/serializers/commit_entity_spec.rb
View file @
b1222ebc
...
@@ -6,7 +6,7 @@ describe CommitEntity do
...
@@ -6,7 +6,7 @@ describe CommitEntity do
end
end
let
(
:request
)
{
double
(
'request'
)
}
let
(
:request
)
{
double
(
'request'
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:project
,
:repository
)
}
let
(
:commit
)
{
project
.
commit
}
let
(
:commit
)
{
project
.
commit
}
subject
{
entity
.
as_json
}
subject
{
entity
.
as_json
}
...
...
spec/serializers/environment_serializer_spec.rb
View file @
b1222ebc
...
@@ -2,7 +2,7 @@ require 'spec_helper'
...
@@ -2,7 +2,7 @@ require 'spec_helper'
describe
EnvironmentSerializer
do
describe
EnvironmentSerializer
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
)
}
let
(
:project
)
{
create
(
:
empty_
project
)
}
let
(
:json
)
do
let
(
:json
)
do
described_class
described_class
...
@@ -11,21 +11,20 @@ describe EnvironmentSerializer do
...
@@ -11,21 +11,20 @@ describe EnvironmentSerializer do
end
end
context
'when there is a single object provided'
do
context
'when there is a single object provided'
do
before
do
let
(
:project
)
{
create
(
:project
,
:repository
)
}
create
(
:ci_build
,
:manual
,
name:
'manual1'
,
let
(
:deployable
)
{
create
(
:ci_build
)
}
pipeline:
deployable
.
pipeline
)
end
let
(
:deployment
)
do
let
(
:deployment
)
do
create
(
:deployment
,
deployable:
deployable
,
create
(
:deployment
,
deployable:
deployable
,
user:
user
,
user:
user
,
project:
project
,
project:
project
,
sha:
project
.
commit
.
id
)
sha:
project
.
commit
.
id
)
end
end
let
(
:deployable
)
{
create
(
:ci_build
)
}
let
(
:resource
)
{
deployment
.
environment
}
let
(
:resource
)
{
deployment
.
environment
}
before
do
create
(
:ci_build
,
:manual
,
name:
'manual1'
,
pipeline:
deployable
.
pipeline
)
end
it
'contains important elements of environment'
do
it
'contains important elements of environment'
do
expect
(
json
)
expect
(
json
)
.
to
include
(
:name
,
:external_url
,
:environment_path
,
:last_deployment
)
.
to
include
(
:name
,
:external_url
,
:environment_path
,
:last_deployment
)
...
...
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