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
94f2ea1d
Commit
94f2ea1d
authored
Mar 01, 2021
by
Manoj M J
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address code review comments
Address code review comments
parent
576b270d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
26 deletions
+10
-26
spec/lib/gitlab/ci/status/factory_spec.rb
spec/lib/gitlab/ci/status/factory_spec.rb
+10
-0
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+0
-26
No files found.
spec/lib/gitlab/ci/status/factory_spec.rb
View file @
94f2ea1d
...
...
@@ -134,4 +134,14 @@ RSpec.describe Gitlab::Ci::Status::Factory do
it_behaves_like
'compound decorator factory'
end
end
context
'behaviour of FactoryBot traits that create associations'
do
context
'creating a namespace with an associated aggregation_schedule record'
do
it
'creates only one Namespace record and one Namespace::AggregationSchedule record'
do
expect
{
create
(
:namespace
,
:with_aggregation_schedule
)
}
.
to
change
{
Namespace
.
count
}.
by
(
1
)
.
and
change
{
Namespace
::
AggregationSchedule
.
count
}.
by
(
1
)
end
end
end
end
spec/models/namespace_spec.rb
View file @
94f2ea1d
...
...
@@ -1502,30 +1502,4 @@ RSpec.describe Namespace do
it
{
is_expected
.
to
be
(
true
)
}
end
end
context
'behaviour of FactoryBot traits that create associations'
do
context
'creating a namespace with an associated aggregation_schedule record'
do
it
'creates only one Namespace record and one Namespace::AggregationSchedule record'
do
expect
{
create
(
:namespace
,
:with_aggregation_schedule
)
}
.
to
change
{
Namespace
.
count
}.
by
(
1
)
.
and
change
{
Namespace
::
AggregationSchedule
.
count
}.
by
(
1
)
end
end
context
'creating a namespace with an associated root_storage_statistics record'
do
it
'creates only one Namespace record and one Namespace::RootStorageStatistics record'
do
expect
{
create
(
:namespace
,
:with_root_storage_statistics
)
}
.
to
change
{
Namespace
.
count
}.
by
(
1
)
.
and
change
{
Namespace
::
RootStorageStatistics
.
count
}.
by
(
1
)
end
end
context
'creating a namespace with an associated namespace_settings record'
do
it
'creates only one Namespace record and one NamespaceSetting record'
do
expect
{
create
(
:namespace
,
:with_namespace_settings
)
}
.
to
change
{
Namespace
.
count
}.
by
(
1
)
.
and
change
{
NamespaceSetting
.
count
}.
by
(
1
)
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