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
Boxiang Sun
gitlab-ce
Commits
b8715643
Commit
b8715643
authored
May 04, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix service spec
parent
3bff8da8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/models/service.rb
app/models/service.rb
+1
-1
spec/models/service_spec.rb
spec/models/service_spec.rb
+2
-2
No files found.
app/models/service.rb
View file @
b8715643
...
...
@@ -258,7 +258,7 @@ class Service < ActiveRecord::Base
return
false
unless
update_attributes
(
service_params
)
if
service_params
[
:active
]
PropagateProjectServiceWorker
.
perform_async
(
service_params
[
:id
]
)
PropagateProjectServiceWorker
.
perform_async
(
id
)
end
true
...
...
spec/models/service_spec.rb
View file @
b8715643
...
...
@@ -258,7 +258,7 @@ describe Service, models: true do
describe
"#update_and_propagate"
do
let
(
:project
)
{
create
(
:empty_project
)
}
let!
(
:service
)
do
RedmineService
.
new
(
RedmineService
.
create
(
project:
project
,
active:
false
,
properties:
{
...
...
@@ -270,7 +270,7 @@ describe Service, models: true do
end
it
'updates the service params successfully and calls the propagation worker'
do
expect
(
PropagateProjectServiceWorker
).
to
receive
(
:perform_async
)
expect
(
PropagateProjectServiceWorker
).
to
receive
(
:perform_async
)
.
with
(
service
.
id
)
expect
(
service
.
update_and_propagate
(
active:
true
)).
to
be
true
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