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
d3b34ada
Commit
d3b34ada
authored
Oct 07, 2020
by
Luke Duncalfe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove DesignAtVersion.instantiate method
Removing this method as it is unused.
parent
b33510a2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
27 deletions
+0
-27
app/models/design_management/design_at_version.rb
app/models/design_management/design_at_version.rb
+0
-4
spec/models/design_management/design_at_version_spec.rb
spec/models/design_management/design_at_version_spec.rb
+0
-23
No files found.
app/models/design_management/design_at_version.rb
View file @
d3b34ada
...
...
@@ -21,10 +21,6 @@ module DesignManagement
@design
,
@version
=
design
,
version
end
def
self
.
instantiate
(
attrs
)
new
(
**
attrs
).
tap
{
|
obj
|
obj
.
validate!
}
end
# The ID, needed by GraphQL types and as part of the Lazy-fetch
# protocol, includes information about both the design and the version.
#
...
...
spec/models/design_management/design_at_version_spec.rb
View file @
d3b34ada
...
...
@@ -274,29 +274,6 @@ RSpec.describe DesignManagement::DesignAtVersion do
build
(
:design_at_version
,
design:
design
,
version:
version
).
id
end
describe
'.instantiate'
do
context
'when attrs are valid'
do
subject
do
described_class
.
instantiate
(
design:
design
,
version:
version
)
end
it
{
is_expected
.
to
be_a
(
described_class
).
and
(
be_valid
)
}
end
context
'when attrs are invalid'
do
subject
do
described_class
.
instantiate
(
design:
create
(
:design
),
version:
create
(
:design_version
)
)
end
it
'raises a validation error'
do
expect
{
subject
}.
to
raise_error
(
ActiveModel
::
ValidationError
)
end
end
end
describe
'.lazy_find'
do
let!
(
:version_a
)
do
create
(
:design_version
,
designs:
create_list
(
:design
,
3
,
issue:
issue
))
...
...
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