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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
378520bd
Commit
378520bd
authored
Feb 12, 2015
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for service template.
parent
9f33898f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
spec/models/service_spec.rb
spec/models/service_spec.rb
+25
-0
No files found.
spec/models/service_spec.rb
View file @
378520bd
...
...
@@ -60,4 +60,29 @@ describe Service do
end
end
end
describe
"Template"
do
describe
"for pushover service"
do
let
(
:service_template
)
{
PushoverService
.
create
(
template:
true
,
properties:
{
device:
'MyDevice'
,
sound:
'mic'
,
priority:
4
,
api_key:
'123456789'
})
}
let
(
:project
)
{
create
(
:project
)
}
describe
'should be prefilled for projects pushover service'
do
before
do
service_template
project
.
build_missing_services
end
it
"should have all fields prefilled"
do
service
=
project
.
pushover_service
expect
(
service
.
template
).
to
eq
(
false
)
expect
(
service
.
device
).
to
eq
(
'MyDevice'
)
expect
(
service
.
sound
).
to
eq
(
'mic'
)
expect
(
service
.
priority
).
to
eq
(
4
)
expect
(
service
.
api_key
).
to
eq
(
'123456789'
)
end
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