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
7ac89d05
Commit
7ac89d05
authored
May 03, 2017
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add service spec
parent
6201f4c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
spec/models/service_spec.rb
spec/models/service_spec.rb
+26
-0
No files found.
spec/models/service_spec.rb
View file @
7ac89d05
...
@@ -254,4 +254,30 @@ describe Service, models: true do
...
@@ -254,4 +254,30 @@ describe Service, models: true do
end
end
end
end
end
end
describe
"#update_and_propagate"
do
let!
(
:service
)
do
RedmineService
.
new
(
project:
project
,
active:
false
,
properties:
{
project_url:
'http://redmine/projects/project_name_in_redmine'
,
issues_url:
"http://redmine/
#{
project
.
id
}
/project_name_in_redmine/:id"
,
new_issue_url:
'http://redmine/projects/project_name_in_redmine/issues/new'
}
)
end
it
'updates the service params successfully and calls the propagation worker'
do
expect
(
PropagateProjectServiceWorker
).
to
receve
(
:perform_async
)
expect
(
service
.
update_and_propagate
(
active:
true
)).
to
be
true
end
it
'updates the service params successfully'
do
expect
(
PropagateProjectServiceWorker
).
not_to
receve
(
:perform_asyncs
)
expect
(
service
.
update_and_propagate
(
properties:
{})).
to
be
true
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