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
Léo-Paul Géneau
gitlab-ce
Commits
af00a159
Commit
af00a159
authored
Jul 12, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused `stop_action?` method from deployment class
parent
e270366d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
22 deletions
+0
-22
app/models/deployment.rb
app/models/deployment.rb
+0
-4
spec/models/deployment_spec.rb
spec/models/deployment_spec.rb
+0
-18
No files found.
app/models/deployment.rb
View file @
af00a159
...
...
@@ -92,10 +92,6 @@ class Deployment < ActiveRecord::Base
@stop_action
||=
manual_actions
.
find_by
(
name:
on_stop
)
end
def
stop_action?
stop_action
.
present?
end
def
formatted_deployment_time
created_at
.
to_time
.
in_time_zone
.
to_s
(
:medium
)
end
...
...
spec/models/deployment_spec.rb
View file @
af00a159
...
...
@@ -157,22 +157,4 @@ describe Deployment do
end
end
end
describe
'#stop_action?'
do
subject
{
deployment
.
stop_action?
}
context
'when no other actions'
do
let
(
:deployment
)
{
build
(
:deployment
)
}
it
{
is_expected
.
to
be_falsey
}
end
context
'when matching action is defined'
do
let
(
:build
)
{
create
(
:ci_build
)
}
let
(
:deployment
)
{
FactoryBot
.
build
(
:deployment
,
deployable:
build
,
on_stop:
'close_app'
)
}
let!
(
:close_action
)
{
create
(
:ci_build
,
:manual
,
pipeline:
build
.
pipeline
,
name:
'close_app'
)
}
it
{
is_expected
.
to
be_truthy
}
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